Error: cannot open include file 'afxres.h'

Hello,

I’m getting this error when a try to compile my cocos windows project.

3>  libjscocos2d.vcxproj -> C:\Users\agostta\Documents\NewProject\build\jsb-default\frameworks\runtime-src\proj.win32\Release.win32\libjscocos2d.lib
4>------ Build started: Project: hello_world, Configuration: Release Win32 ------
4>  main.cpp
4>  AppDelegate.cpp
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale(341): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (compiling source file main.cpp)
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale(341): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (compiling source file ..\Classes\AppDelegate.cpp)
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(359): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc (compiling source file main.cpp)
4>..\Classes\AppDelegate.cpp(41): warning C4305: 'argument': truncation from 'double' to 'float'
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(359): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc (compiling source file ..\Classes\AppDelegate.cpp)
4>game.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.
4>
========== Build: 3 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Error running command, return code: 1.

Some tips?

Thanks a lot!

If you create a a project, don’t create from windows application template.
I don’t know how is the cocos2d-x template on windows, or how you created, but try to turn off the use of precompiled header files.

Hi @gejza
I created my project from Cocos Creator,

Then after i installed python/Ant/NDK/SDK/Visua Studio/Configured environment variables and tryed build.

For Android it’s compile and run perfectly. :heart_eyes:
But for Windows i got the error above trying compile the Cocos SDK.

There’s no possible to use a precompiled option?
thanks.

News,

I deleted the file game.rc and it compiled