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

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

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

PB wrote:
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.
Everything works for compiling wxWidgets when I use the command line but touch the new MSVC10 (Visual Studio 2010) IDE and nothing worked where it used to. Know what is really nasty in MSVC11 (Visual Studio 2012) Express? I read that they will no longer allow most of the stuff you are accustomed to. I think one was no more C++ in the express edition. :/

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:29 pm

These error usually mean that the libraries and the application were build using different CRT settings.
Use the source, Luke!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2658
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:33 pm

I understand your frustration, and so I would kindly recommend you to check out the wxWiki guide explaining how to build the wxWidgets library in a beginner friendly way. I believe the basic issues you're struggling with, like not properly including platform specific setup.h and those new errors of yours (linking against wrong CRT, perhaps) are covered there.

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:36 pm

PB wrote:I understand your frustration, and so I would kindly recommend you to check out the wxWiki guide explaining how to build the wxWidgets library in a beginner friendly way. I believe the basic issues you're struggling with, like not properly including platform specific setup.h and those new errors of yours (linking against wrong CRT, perhaps) are covered there.
Heh, far from a noob but I do expect stuff to work as it used to and Visual Studio 2010 is just a big PITA (I actually don't even like the look nor the feel of it).

Thanks though.

edit: Just to let you know I followed http://wiki.wxwidgets.org/Microsoft_Vis ... B%2B_Guide
Last edited by Dark Alchemist on Thu Jul 26, 2012 1:47 pm, edited 1 time in total.

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:37 pm

doublemax wrote:These error usually mean that the libraries and the application were build using different CRT settings.
Yep, my program is /MT and wxWidgets is /MD I believe but on the command line when compiling wxWidgets how would I tell wxWidgets to be /MT because I don't compile my programs as /MD which I do believe these errors are telling me.

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:49 pm

Add RUNTIME_LIBS=static to the command line when building the wxWidgets libraries.
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:30 pm

doublemax wrote:Add RUNTIME_LIBS=static to the command line when building the wxWidgets libraries.
That is exactly what I was missing so thank you.

I never did get the IDE to do what I told it though. Where can I find which libs are now obsolete because I noticed a few included in my old 2.8.11 builds that never were built for 2.9.4?

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 2:47 pm

Where can I find which libs are now obsolete because I noticed a few included in my old 2.8.11 builds that never were built for 2.9.4?
Like which ones? The only ones i can think of are "odbc" and "dbgrid" which were removed because ODBC support was dropped.
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:54 pm

doublemax wrote:
Where can I find which libs are now obsolete because I noticed a few included in my old 2.8.11 builds that never were built for 2.9.4?
Like which ones? The only ones i can think of are "odbc" and "dbgrid" which were removed because ODBC support was dropped.
LOL, OMG, LOL those are exactly the two. Hahahaha.

I do have a question about some compile things as I am not used to compiling via nmake (I miss my IDE). How do I pass the commands I do in the ide via the nmake? I like to set compile for size, etc... that I have no idea how to do via the command line. I can put it in the .cfg file for the make but I was hoping it could be done via the command line.

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 4:16 pm

I don't think there are parameters for every single compiler/linker option. I guess you can pass them somehow through CPPFLAGS=... and LDFLAGS=..., but i don't know.
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 5:19 pm

doublemax wrote:I don't think there are parameters for every single compiler/linker option. I guess you can pass them somehow through CPPFLAGS=... and LDFLAGS=..., but i don't know.
That is exactly what I did and it worked 100%.

I still wish I understood why I had to revert to nmake to do the job the ide was always able to do? Well, get ready for Visual Studio 2012 cause it is on the MSDN now and I know the free command line version is stripped of a ton of stuff. One thing I could have sworn was that C++ is no longer a part of the free version. Makes sense because they didn't even include C++ with 2010 and that is why I waited this long before I went to it. Figure 2012 around 2014/2015 or right before the next one comes out but I have feared (since 2008) that eventually I will be forced to leave Visual Studio because I refuse to do .net and C# and they are refusing to do C++. GSS is so ugh too.

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 6:05 pm

I still wish I understood why I had to revert to nmake to do the job the ide was always able to do?
It still works for me, so don't think it was something big.
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 9:35 pm

doublemax wrote:
I still wish I understood why I had to revert to nmake to do the job the ide was always able to do?
It still works for me, so don't think it was something big.
Yep, and my project compiled fine so it was something minor that must not have translated for me correctly when I would bring in the wxWidgets project.

No biggie but thank you for your help. :)

Post Reply