fatal error C1083: Cannot open precompiled header file

Posted 03 March 2010 - 05:29 PM

Ok I'm new to C++ but I'm trying to compile an uno game I found online. I keep running into this error. I'm not sure if I need to put up all the .cpp but I put up the unonet. I just want to see if this can compile without an error.

Re: fatal error C1083: Cannot open precompiled header file

Posted 03 March 2010 - 06:04 PM

carltech, on 03 March 2010 - 04:53 PM, said:

can you give an example of where you try to include and use minimal.pch?

I'm not quite sure what you mean by an example. As I said I'm really new to C++. I know that the .\vc_mswd\minimal gets automatically created when I try to build the solution. I've deleted the file several times because I read on the internet that the permission denied means that the file is being used by something else. Every time I build the solution it's created again.

So every time I try something different I get a whole different error. I guess that's not a bad thing at least it's not the same error. Don't worry not taking anything into offense. If these simple posts help me figure out what I'm doing wrong I'll even kiss the ground you walk on (not really but hey it sounded good).

Re: fatal error C1083: Cannot open precompiled header file

Posted 04 March 2010 - 12:46 PM

These two things put together helped me understand more about the wxWidgets. So I followed the second quote and now I got rid of the 1>C:\wxWidgets\include\wx/platform.h(190) : fatal error C1083: Cannot open include file: 'wx/setup.h': No such file or directory. Now to figure out how to fix the 1>c:\users\sherry\desktop\uno\NetworkManager.h(4) : fatal error C1083: Cannot open include file: 'PacketEnumerations.h': No such file or directory. Ugh!

Make sure the DLLs are in your PATH. They'll be found in [WXWIN root]\lib\vc_dll
6.

Under the DLL folder mentioned above, you will find subfolders for each build variant (The instructions above made two, debug and release.) In each variant folder you'll find a 'wx' folder containing a 'setup.h" file. You'll see that the setup.h files are actually different for each build variant. These are the folders you need to add to your project build configuration include path, one per build variant. So, for example, you'd add [WXWIN root]\lib\vc_dll\mswud to the include path for your debug build, [WXWIN root]\lib\vc_dll\mswu for your release build.
7.

It is possible to build lots of other variant combinations: static libs, monolithic single library, non-Unicode, etc. See [WXWIN root]\docs\msw\install.txt for much more extensive instructions.

Quote

The setup.h is not supposed to be in the include/wx folder. This would prevent you from using wxWidgets with multiple build configurations; debug, release, etc. The build process actually copies appropriately configured setup.h headers to configuration-specific folders under [WXWIN root]\lib. – kbluck Oct 16 '08 at 15:57

for example if you are under windows,copy the setup.h from wx/msw to wx. – jcyang Jan 19 at 3:03