2
votes

I've been trying to install and use wxWidgets v(2.8). I constantly run into the same issue. When building the wxWidgets libraries. I get this error:

error C1083: Cannot open include file: 'zlib.h': No such file or directory d:\wxwidgets-2.8.12\src\png\png.h 346

I can't work out why when I've installed it from the exe. I'm following the instructions from here: http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide

I also get a Linker error which I don't think matters particularly.

Any help would be great. I've tried installing this from the exe and have also just use the zip folder but still run into the same issues. I suspect it might be something to do with environment variables but can't find a definitive answer whether they are required and what they should be set too.

EDIT Also got something similar here:

error C1083: Cannot open include file: 'expat_config.h': No such file or directory D:\wxWidgets-2.8.12\src\expat\lib\xmlparse.c 30 Cheers

2
'the 20 projects' - Do you mean the sample projects? Please post the error message. BTW, since you are starting fresh, why not use v2.9? - ravenspoint
@ravenspoint According to the link I provided you have to build the projects in the file wxWidgets-2.8.12\build\msw\wx.dsw and convert the projects to the lastest Visual Studio project. I chose 2.8 since I couldn't find any documentation on the 2.9 installation process which has a few extra projects. I'll edit the question with the error. - Bushes
OK, those are the projects to build the libraries. - ravenspoint
In my installation zlib.h is present in \wxWidgets-2.8.12\src. You? - ravenspoint
@ravenspoint I've got a zlib folder which then has zlib.h in so wxWidgets-2.18.12\src\zlib. - Bushes

2 Answers

0
votes

In png.h at line 346 we have

/* include the compression library's header */
#include "zlib.h"

So you need to tell the compiler to look in wxWidgets-2.18.12\src\zlib for headers.

0
votes

With another install I managed to fix this.