Cannot open include file: 'wx/setup.h' using Win installer Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Cannot open include file: 'wx/setup.h' using Win installer

Post by Dark Alchemist » Wed Jul 25, 2012 1:19 am

I just uninstalled MSVC 2008 and my old WxWidgets-2.8.11. I install MSVC 2010 and grab the 2.9.3 exe installer (Windows installer) for the build stuff. So, I load up everything and do a batch build and I get 18 failures due to that message. I look in the headers and that sucker is for the Unix build but this is the MSW build/MSW exe so what gives? I tried to comment it out and it gave even more errors.

How do I fix this?

Thanks.

User avatar
doublemax
Moderator
Moderator
Posts: 15263
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by doublemax » Wed Jul 25, 2012 5:49 am

Is that VS2010 express? AFAIR the express version can't build 2.9.x (technically it could, but it doesn't convert the project files correctly).

Also, the latest version is 2.9.4.
Use the source, Luke!

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by Dark Alchemist » Wed Jul 25, 2012 10:07 am

2.9.4 would not download as it gave an error in the right hand corner of the download page and said to try another version.

This is not express this is Ultimate.

User avatar
doublemax
Moderator
Moderator
Posts: 15263
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by doublemax » Wed Jul 25, 2012 10:53 am

Try the zip-archive. The installer doesn't do much anyway.
Use the source, Luke!

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by Dark Alchemist » Thu Jul 26, 2012 2:01 am

Grabbed 2.9.4 zip and I have a ton of warnings (like this "warning MSB8012: TargetPath(C:\wxWidgets-2.9.4\build\msw\.\..\..\lib\vc_lib\wxregex.lib) does not match the Library's OutputFile property value (C:\wxWidgets-2.9.4\lib\vc_lib\wxregexu.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).") but no errors. ========== Rebuild All: 23 succeeded, 0 failed, 0 skipped ==========

Something is wrong with that installer version.

Alright I think that warning above has to be corrected and I have no idea how because no matter what I do wxwidgets is forced to be built in Unicode release build so my flags I am telling it are not working.

HELP, lol. :/

Grrrr, MSVC 10 is what is causing this as I never had this issue before.

After digging around I found this (I so hate MS with each release of VS they do and MSVS 2012 from what I have read is very bad if you like C++ as MSVS 2010 started this trend):
About the original bug the warning is generated because in Visual Studio 2010 we have moved the C++ build system to be based on MSBuild. In earlier versions of Visual Studio when you changed the output file property the "TargetName" "TargetExt" properties were changed in background by the product itself. In this release we dont have that functionality and we have now become more transparent and warn the user to make sure that the output file property does match with the "OutDir" "TargetName" and "TargetExt" properties.

Your can change %(lib.outputfile) by going to project properties "Configuration Properties->Librarian->Output File".
They sure do love to fiddle but I am unsure if this is what is causing me to be in Unicode release no matter what I put the flags to or not.

Fixed that warning by going into the librarian and telling it to inherit from project (something new to 2010) but my compile issues still exist with it forcing me to Unicode regardless what I set.

User avatar
doublemax
Moderator
Moderator
Posts: 15263
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by doublemax » Thu Jul 26, 2012 8:07 am

If you don't want Unicode (why?), find this line in setup.h, change the value to 0 and do a clean rebuild of the library.

Code: Select all

#define wxUSE_UNICODE 1
Use the source, Luke!

User avatar
doublemax
Moderator
Moderator
Posts: 15263
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by doublemax » Thu Jul 26, 2012 9:10 am

BTW: You can also build from the command line using Visual Studio, then you don't have the issue with the not properly converted project files.
Use the source, Luke!

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by Dark Alchemist » Thu Jul 26, 2012 10:19 am

doublemax wrote:If you don't want Unicode (why?), find this line in setup.h, change the value to 0 and do a clean rebuild of the library.

Code: Select all

#define wxUSE_UNICODE 1
I did that and it still gives me the Unicode release only build.

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by Dark Alchemist » Thu Jul 26, 2012 10:21 am

doublemax wrote:BTW: You can also build from the command line using Visual Studio, then you don't have the issue with the not properly converted project files.
My files are now converted properly with something new 2010 demands (as I printed above) but it will not abide by any switches AND when I tell it to convert all to multi-byte builds it doesn't matter.

User avatar
doublemax
Moderator
Moderator
Posts: 15263
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by doublemax » Thu Jul 26, 2012 10:25 am

I did that and it still gives me the Unicode release only build.
And how do you determine that? As it's just a flag and not a separate compiler configuration, the filenames of the libraries won't change, so they will still have the 'U' in them.
Use the source, Luke!

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by Dark Alchemist » Thu Jul 26, 2012 10:38 am

doublemax wrote:
I did that and it still gives me the Unicode release only build.
And how do you determine that? As it's just a flag and not a separate compiler configuration, the filenames of the libraries won't change, so they will still have the 'U' in them.
You can tell that by the directory in which they are created.

I fixed it btw as it has been so long since I created a wxWidgets (always just used my build from 2010) that I went into the nmake and remembered that I needed to change makefile.vc to makefile (thanks for the command line suggestion or I would not have remembered this).

I will say I cannot get 2010 to obey me in the ide when compiling as it refuses. Nmake with my config - vc_msw IDE (with all of my changes) - vc_mswu

Why is 2010 doing this?

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by Dark Alchemist » Thu Jul 26, 2012 1:00 pm

I think I am going to go back to 2008 because frankly I no longer have the patience I once had.

C:\wxWidgets-2.9.4\include\wx/platform.h(154): fatal error C1083: Cannot open include file: 'wx/setup.h': No such file or directory

That is what I get compiling a program. Again, it thinks I am on Unix.

User avatar
doublemax
Moderator
Moderator
Posts: 15263
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by doublemax » Thu Jul 26, 2012 1:16 pm

That is what I get compiling a program. Again, it thinks I am on Unix.
What program? Yours of one of the samples? And what does this have to do with Unix?

Anyway, if the libraries build successfully, it's probably just a simple issue of wrong include path, especially since you messed with the Unicode configuration.

Check the include path(s) and see if setup.h is there.
Use the source, Luke!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2659
Joined: Sun Jan 03, 2010 5:45 pm

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by PB » Thu Jul 26, 2012 1:23 pm

Dark Alchemist wrote:C:\wxWidgets-2.9.4\include\wx/platform.h(154): fatal error C1083: Cannot open include file: 'wx/setup.h': No such file or directory
This is the exact error I would get with MSVC 2008 Express, had I not built the library successfully and didn't add

Code: Select all

"$(WXWIN)\lib\vc_lib\mswud"
(adjusted for build, this is for Unicode debug) to C++ include directories (in addition to "$(WXWIN)\include") in my app project settings.

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Re: Cannot open include file: 'wx/setup.h' using Win install

Post by Dark Alchemist » Thu Jul 26, 2012 1:26 pm

doublemax wrote:
That is what I get compiling a program. Again, it thinks I am on Unix.
What program? Yours of one of the samples? And what does this have to do with Unix?

Anyway, if the libraries build successfully, it's probably just a simple issue of wrong include path, especially since you messed with the Unicode configuration.

Check the include path(s) and see if setup.h is there.
To answer you doublemax what does this have to do with Unix? This...

Code: Select all

/*
   Include wx/setup.h for the Unix platform defines generated by configure and
   the library compilation options

   Note that it must be included before defining hardware symbols below as they
   could be already defined by configure
 */
#include "wx/setup.h"
that is where it was crapping out so the <bleep> IDE is not setting some flag. So, I removed everything and started over and this time I said to heck with the IDE, since it will NOT play nice and do as I demand as it used to, and went straight into the nmake command line. It all compiled just fine and did exactly as I told it to do AND the final outcome is as it has been since 2005 for me.

Now, I do have new errors though but if I remember right these used to be a simple fix but nothing is simple anymore in Microcrap land and I can't remember what the fix was.

Code: Select all

1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" ([email protected]@@[email protected]) already defined in libcpmt.lib(xthrow.obj)
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" ([email protected]@@[email protected]) already defined in libcpmt.lib(xthrow.obj)
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pptr(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in 1Frm.obj
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in 1Frm.obj
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gptr(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in 1Frm.obj
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbump(int)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in 1Frm.obj
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gbump(int)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in 1Frm.obj
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in 1Frm.obj
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" ([email protected]@@[email protected]@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" ([email protected]@@[email protected]) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _memmove already defined in LIBCMT.lib(memmove.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" ([email protected]@@[email protected]@@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _abort already defined in LIBCMT.lib(abort.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __strtol_l already defined in LIBCMT.lib(strtol.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __strtoul_l already defined in LIBCMT.lib(strtol.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strpbrk already defined in LIBCMT.lib(strpbrk.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strtol already defined in LIBCMT.lib(strtol.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strtoul already defined in LIBCMT.lib(strtol.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __strtoi64 already defined in LIBCMT.lib(strtoq.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __strtoui64 already defined in LIBCMT.lib(strtoq.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _iswalpha already defined in LIBCMT.lib(_wctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _iswdigit already defined in LIBCMT.lib(_wctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _iswspace already defined in LIBCMT.lib(_wctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __errno already defined in LIBCMT.lib(dosmap.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: bool __thiscall type_info::operator==(class type_info const &)const " ([email protected]@[email protected]@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _iswalnum already defined in LIBCMT.lib(_wctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _setlocale already defined in LIBCMT.lib(setlocal.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isalnum already defined in LIBCMT.lib(_ctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isalpha already defined in LIBCMT.lib(_ctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isdigit already defined in LIBCMT.lib(_ctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isspace already defined in LIBCMT.lib(_ctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __create_locale already defined in LIBCMT.lib(setlocal.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __free_locale already defined in LIBCMT.lib(setlocal.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strncmp.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: bool __thiscall type_info::operator!=(class type_info const &)const " ([email protected]@[email protected]@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _iswprint already defined in LIBCMT.lib(_wctype.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _tolower already defined in LIBCMT.lib(tolower.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _ldexp already defined in LIBCMT.lib(_ldexp_.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>1App.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::Initialize(int &,wchar_t * *)" ([email protected]@@[email protected])
1>1App.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsoleBase::OnAssert(wchar_t const *,int,wchar_t const *,wchar_t const *)" ([email protected]@@[email protected])
1>1App.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsoleBase::OnAssertFailure(wchar_t const *,int,wchar_t const *,wchar_t const *,wchar_t const *)" ([email protected]@@[email protected])
1>1Frm.obj : error LNK2001: unresolved external symbol "wchar_t const * const wxEmptyString" ([email protected]@3PB_WB)
1>1Frm.obj : error LNK2001: unresolved external symbol "private: static struct wxString::SubstrBufFromType<class wxScopedCharTypeBuffer<wchar_t> > __cdecl wxString::ConvertStr(char const *,unsigned int,class wxMBConv const &)" ([email protected]@@[email protected][email protected][email protected]@@[email protected]@@@Z)
1>1Frm.obj : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,wchar_t const *)" ([email protected]@[email protected])
1>wxmsw29_core.lib(corelib_uuid.obj) : error LNK2001: unresolved external symbol [email protected]
1>wxmsw29_core.lib(corelib_uuid.obj) : error LNK2001: unresolved external symbol [email protected]
1>wxmsw29_core.lib(corelib_uuid.obj) : error LNK2001: unresolved external symbol [email protected]
1>wxmsw29_core.lib(corelib_uuid.obj) : error LNK2001: unresolved external symbol [email protected]

Post Reply