4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.82k stars 848 forks source link

windows compiling using code::blocks , loading GDCore.cbp gives wx error wx/setup.h: No such file or directory #21

Closed meiry closed 10 years ago

meiry commented 10 years ago

i download the ExtLib's as suggested by you . (wxwidgets.7z) loaded the GDCore.cbp in code::blocks then -> build , getting this compilation error: ||=== Build: Debug - Edittime in Game Develop Core (compiler: GNU GCC Compiler) ===| d:\dev\cpp\GameDevelop_source\GD\ExtLibs\wxwidgets\include\wx\platform.h |fatal error: wx/setup.h: No such file or directory| ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

there file is not there , what im missing here ? using windows 7 32 bit Thanks

meiry commented 10 years ago

ok found that needs to add msw so it look like this: wx/msw/setup.h

by the way you have allot of compilation errors when trying to compile in code::blocks

4ian commented 10 years ago

Never use the C::B projects file, they are severly outdated and only here to use the wxSmith dialog editor (for old dialogs. New one should be built with wxCrafter). Instead, use CMake as explained in the documentation: everything you need is explained and you can even ask Cmake you generate a Code::Blocks project file if you are more familiar with it.

Let me know if you have any trouble using Cmake as explained in the doc. :)

meiry commented 10 years ago

Hey well i will try to generate Code block project , you see i need IDE with the project , not just compile it ok i did try it using cmake-GUI : code::blocks MinGW makefiles but getting error : CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER_ENV_VAR

Although i have mingw32-make.exe in my path

UPDATE: i download fresh mingw 5.2 from SF , created succesfuly code::blocks project files in cmake loaded in C::B and compiled All looks good untill i hit another compilation error: that say :

D:\dev\cpp\GameDevelop_source\GD\GDCpp\GDCpp\Animation.cpp|15|error: definition of static data member 'gd::Animation::badDirection' of dllimport'd class|

what do i miss here ?

victorlevasseur commented 10 years ago

You should use the version of MinGW (and it's not MinGW but TDM-GCC) provided in the documentation : that's the only officially supported compiler on Windows. http://4ian.github.io/GD-Documentation/GDCore%20Documentation/setup_dev_env.html http://4ian.github.io/GD-Documentation/GDCore%20Documentation/install_win_compiler.html (and disable online updates in the compiler installer)

meiry commented 10 years ago

Yep did it Version 4.5.2 disabled update

victorlevasseur commented 10 years ago

You should try to generate only a mingw makefile and build it directly with mingw.

4ian commented 10 years ago

It would be nice indeed if you could try again to use Cmake (have you the latest version of it?) to build MinGW Makefiles. If you change the compiler, make sure to clear the cache in cmake (File > Clear Cache if I remember correctly).

CMake should always be able to build MinGW makefiles if it is installed properly.

meiry commented 10 years ago

Hey , well i managed to compile the app both in realse and debug after staring all over again . now im facing new problem , when i hit the "Run" in C::B trying to debug the GDIDE_dev im getting this error: all the dll's are in the C::B working directory . (taken from the original installation ) codeb

any idea why ? mybe is searching for debug mode dll's?

by the way if i copy my compiled GDIDE_dev.exe replace it with the original GDIDE_dev.exe that shipped with the app its working fine

victorlevasseur commented 10 years ago

You need to put the SFML debug libs (in Debug_Windows folder) when you're working with the debug version.

meiry commented 10 years ago

Thanks, that means i need to compile it to debug , also boost and wx ?

victorlevasseur commented 10 years ago

Or you can compile Game Develop in release mode to avoid those problems and to test if it compiles correctly.

2014-09-17 11:00 GMT+02:00 Meir Yanovich notifications@github.com:

Thanks, that means i need to compile it to debug , also boost and wx ?

— Reply to this email directly or view it on GitHub https://github.com/4ian/GD/issues/21#issuecomment-55866843.

Victor LEVASSEUR victorlevasseur52@gmail.com

meiry commented 10 years ago

Heh na i want to debug it . (:

victorlevasseur commented 10 years ago

So, you have to build a debug version of wxwidgets (I don't know if it's provided with the wxwidgets .zip), of SFML (maybe already provided). For Boost, there is nothing to build (only use header lib).

2014-09-17 11:23 GMT+02:00 Meir Yanovich notifications@github.com:

Heh na i want to debug it . (:

— Reply to this email directly or view it on GitHub https://github.com/4ian/GD/issues/21#issuecomment-55869168.

Victor LEVASSEUR victorlevasseur52@gmail.com

meiry commented 10 years ago

ok already build them as dynamic lib's can you tell me please where to place them for the compilation ? where in the CMAKE you defined where to search for the *.a files ?

victorlevasseur commented 10 years ago

The lib are automatically taken from the Extlibs folder, so you don't have anything to do if you've just extract the zip in this folder. In fact, I've never tried to compile GD in debug mode. Do you manage to get the release version working ?

meiry commented 10 years ago

not yet , i set the configuration in CMAKE to compile to debug i have no need to release ok im recompiling now ,

meiry commented 10 years ago

Well good news , every thing is running fine , the process is not easy to make it compile and run from C::B Thanks for the help .

4ian commented 10 years ago

Excellent! Can I consider this question as closed? :smile:

meiry commented 10 years ago

yes ! thanks . say what is your email i like to ask you some questions not related if i may .

4ian commented 10 years ago

Should be on my profile Florian.rival@gmail.com You can ask question on the forum also http://forum.compilgames.net

Think-Jumper commented 6 years ago

WIN10 64bit, I built the project using CodeLite which making by CMake, but it's something wrong:MESSAGE: Entering directory F:\Github\4ian\GD\build' C:\WINDOWS\system32\cmd.exe /C K:/my_dev_env/module_gcc/TDM-GCC-64/bin/mingw32-make.exe -j 16 ----------Building project:[ GDevelop - Debug ]---------- current path=F:/Github/4ian/GD/Binaries/Output/Debug_Windows/CppPlatform Copying GDC++ and extensions to F:/Github/4ian/GD/Binaries/Output/Debug_Windows/CppPlatform... Copying GDJS and extensions runtime files (*.js) to F:/Github/4ian/GD/Binaries/Output/Debug_Windows/JsPlatform/Runtime... [ 0%] Built target sfml-main ¸´ÖÆÁË 0 ¸öÎļþ ¸´ÖÆÁË 0 ¸öÎļþ [ 1%] Built target sfml-system -- Found Git: H:/Program Files/Git/cmd/git.exe (found version "2.16.2.windows.1") -- VersionPriv.h already up-to-date. ¸´ÖÆÁË 0 ¸öÎļþ ¸´ÖÆÁË 0 ¸öÎļþ Copied GDJS and extensions runtime files (*.js) to 'F:/Github/4ian/GD/Binaries/Output/Debug_Windows/JsPlatform/Runtime'. [ 1%] Built target GDVersion [ 1%] Built target GDJS_Runtime [ 2%] Built target sfml-network [ 4%] Built target sfml-audio [ 7%] Built target sfml-window [ 10%] Built target sfml-graphics ¸´ÖÆÁË 0 ¸öÎļþ ¸´ÖÆÁË 0 ¸öÎļþ ¸´ÖÆÁË 0 ¸öÎļþ ¸´ÖÆÁË 0 ¸öÎļþ [ 11%] Built target GDIDE_exe destDir\MinGW32="F:/Github/4ian/GD/Binaries/Output/Debug_Windows/CppPlatform\MinGW32\" [ 11%] Built target GDIDE_dev_exe Precompiling headers: GDCpp/EventsPrecompiledHeader.h.pch [ 21%] Built target GDCpp_Runtime [ 21%] Linking CXX shared library ..\..\Binaries\Output\Debug_Windows\GDCore.dll [ 21%] Built target DestroyOutsideBehavior_Runtime [ 21%] Built target DraggableBehavior_Runtime [ 22%] Built target CommonDialogs_Runtime [ 22%] Built target AnchorBehavior_Runtime [ 24%] Built target Inventory_Runtime [ 25%] Built target Light_Runtime [ 25%] Built target Function_Runtime [ 25%] Built target Box3DObject_Runtime [ 26%] Built target Network_Runtime [ 26%] Built target AES_Runtime [ 26%] Built target AdvancedXML_Runtime [ 26%] Built target GDCpp_Runtime_exe [ 27%] Built target LinkedObjects_Runtime [ 28%] Built target ParticleSystem_Runtime Done. [ 30%] Built target PathBehavior_Runtime [ 32%] Built target PanelSpriteObject_Runtime [ 33%] Built target PhysicsBehavior_Runtime [ 34%] Built target PathfindingBehavior_Runtime [ 34%] Built target GDCpp_IDE_Headers [ 34%] Built target PlatformBehavior_Runtime [ 35%] Built target TextObject_Runtime [ 35%] Built target SystemInfo_Runtime [ 35%] Built target SoundObject_Runtime [ 35%] Built target PrimitiveDrawing_Runtime [ 36%] Built target TileMapObject_Runtime [ 36%] Built target TextEntryObject_Runtime [ 37%] Built target TimedEvent_Runtime [ 38%] Built target TiledSpriteObject_Runtime [ 39%] Built target TopDownMovementBehavior_Runtime CMakeFiles\GDCore.dir/objects.a(CommentEvent.cpp.obj): In functiongd::CommentEvent::EditEvent(wxWindow, gd::Project&, gd::Layout&, gd::MainFrameWrapper&)': F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:55: undefined reference to wxDialog::ShowModal()' CMakeFiles\GDCore.dir/objects.a(CommentEvent.cpp.obj): In functiongd::CommentEvent::Render(wxDC&, int, int, unsigned int, gd::EventsEditorItemsAreas&, gd::EventsEditorSelection&, gd::Platform const&)': F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:71: undefined reference to wxHtmlDCRenderer::SetStandardFonts(int, wxString const&, wxString const&)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:74: undefined reference towxColourBase::GetAsString(long) const' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:74: undefined reference to `operator+(char const, wxString const&)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:74: undefined reference to operator+(wxString const&, char const*)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:75: undefined reference towxColourBase::GetAsString(long) const' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:75: undefined reference to operator+(char const*, wxString const&)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:75: undefined reference tooperator+(wxString const&, char const*)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:81: undefined reference to wxHtmlDCRenderer::SetSize(int, int)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:83: undefined reference towxHtmlDCRenderer::SetHtmlText(wxString const&, wxString const&, bool)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:84: undefined reference to wxHtmlDCRenderer::GetTotalHeight() const' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:86: undefined reference towxHtmlDCRenderer::SetHtmlText(wxString const&, wxString const&, bool)' F:/Github/4ian/GD/Core/GDCore/Events/Builtin/CommentEvent.cpp:87: undefined reference to `wxHtmlDCRenderer::GetTotalHeight() const' .............................................(too many same thing ) and so on.

it seems error in link the wxWidgets libs, and I found the script in "Github\4ian\GD\GDCpp\scripts\CopyHeadersToGD.bat" line24, it's better do "set MINGW_DIR="C:\TDM-GCC-32" because I don't install TDM-GCC-32 in C:\ but in K:/my_dev_env/module_gcc/TDM-GCC-64/.

4ian commented 6 years ago

Are you sure you're using the right compiler version? You should be using TDM-GCC 4.9.2, you can download it here: https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1309.0/tdm-gcc-4.9.2.exe/download

Be sure to uncheck "Check for updated files on the TDM/MinGW server". Let me know if it's working better (delete and recreate the whole CMake build to be sure)