Bullet in Code::Blocks, Win 7 and MinGW?
-
- Posts: 4
- Joined: Thu Oct 25, 2012 1:35 pm
Bullet in Code::Blocks, Win 7 and MinGW?
Could someone recommend a way to try out the Bullet BasicDemo in Windows 7 (64bit), Code::Blocks, and MinGW? The instructions I found in the web so far are not very detailed. I tried out a few of them, but I don't have the expertise to deal with the errors I get. I would appreciate a lot, if someone could provide step by step instructions to make the demo compile and run.
-
- Posts: 4
- Joined: Thu Oct 25, 2012 1:35 pm
Re: Bullet in Code::Blocks, Win 7 and MinGW?
I took one more attempt with CMake, by modifying the tutorial Creating a project from scratch. I managed to generate a Code::Blocks project, but with these warnings from CMake:
OPENGL FOUND
glu32opengl32
WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
GLUT NOT FOUND not found, trying to use MINGW glut32
GLUT NOT FOUND
WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
Could NOT find GLUT (missing: GLUT_INCLUDE_DIR)
Configuring done
Generating done
After that when I try to build AppBasicDemo in Code:Blocks, I get this error: fatal error: GL/glut.h: No such file or directory, and I can't manually add a search path when using a CMake generated custom makefile. Someone has had a similar problem before here. This is my complete build log:
-------------- Build: AppBasicDemo in BULLET_PHYSICS ---------------
Running command: C:/MinGW/bin/mingw32-make.exe -f "C:/Projects/Bullet CMake/Demos/BasicDemo/Makefile" VERBOSE=1 AppBasicDemo
cd /d C:\Projects\BULLET~1 && C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\Makefile2 Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/rule
mingw32-make.exe[1]: Entering directory `C:/Projects/BULLET~1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:\Projects\Bullet -B"C:\Projects\Bullet CMake" --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_start "C:\Projects\Bullet CMake\CMakeFiles" 42
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\Makefile2 Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/all
mingw32-make.exe[2]: Entering directory `C:/Projects/BULLET~1'
C:/MinGW/bin/mingw32-make.exe -f Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\build.make Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/depend
mingw32-make.exe[3]: Entering directory `C:/Projects/BULLET~1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" C:\Projects\Bullet C:\Projects\Bullet\Demos\OpenGL "C:\Projects\Bullet CMake" "C:\Projects\Bullet CMake\Demos\OpenGL" "C:\Projects\Bullet CMake\Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\DependInfo.cmake" --color=
Dependee "C:\Projects\Bullet CMake\Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\DependInfo.cmake" is newer than depender "C:/Projects/Bullet CMake/Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/depend.internal".
Dependee "C:/Projects/Bullet CMake/Demos/OpenGL/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "C:/Projects/Bullet CMake/Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/depend.internal".
Scanning dependencies of target OpenGLSupport
mingw32-make.exe[3]: Leaving directory `C:/Projects/BULLET~1'
C:/MinGW/bin/mingw32-make.exe -f Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\build.make Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/build
mingw32-make.exe[3]: Entering directory `C:/Projects/BULLET~1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report "C:\Projects\Bullet CMake\CMakeFiles"
[ 0%]
Building CXX object Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/GLDebugFont.obj
cd /d C:\Projects\BULLET~1\Demos\OpenGL && C:\MinGW\bin\g++.exe -DUSE_GRAPHICAL_BENCHMARK -D_IRR_STATIC_LIB_ -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -O3 -DNDEBUG @CMakeFiles/OpenGLSupport.dir/includes_CXX.rsp -o CMakeFiles\OpenGLSupport.dir\GLDebugFont.obj -c C:\Projects\Bullet\Demos\OpenGL\GLDebugFont.cpp
C:\Projects\Bullet\Demos\OpenGL\GLDebugFont.cpp:44:21: fatal error: GL/glut.h: No such file or directory
compilation terminated.
mingw32-make.exe[3]: *** [Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/GLDebugFont.obj] Error 1
mingw32-make.exe[2]: *** [Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/all] Error 2
mingw32-make.exe[1]: *** [Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/rule] Error 2
mingw32-make.exe: *** [Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/rule] Error 2
mingw32-make.exe[3]: Leaving directory `C:/Projects/BULLET~1'
mingw32-make.exe[2]: Leaving directory `C:/Projects/BULLET~1'
mingw32-make.exe[1]: Leaving directory `C:/Projects/BULLET~1'
Process terminated with status 2 (0 minutes, 2 seconds)
1 errors, 0 warnings
OPENGL FOUND
glu32opengl32
WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
GLUT NOT FOUND not found, trying to use MINGW glut32
GLUT NOT FOUND
WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
Could NOT find GLUT (missing: GLUT_INCLUDE_DIR)
Configuring done
Generating done
After that when I try to build AppBasicDemo in Code:Blocks, I get this error: fatal error: GL/glut.h: No such file or directory, and I can't manually add a search path when using a CMake generated custom makefile. Someone has had a similar problem before here. This is my complete build log:
-------------- Build: AppBasicDemo in BULLET_PHYSICS ---------------
Running command: C:/MinGW/bin/mingw32-make.exe -f "C:/Projects/Bullet CMake/Demos/BasicDemo/Makefile" VERBOSE=1 AppBasicDemo
cd /d C:\Projects\BULLET~1 && C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\Makefile2 Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/rule
mingw32-make.exe[1]: Entering directory `C:/Projects/BULLET~1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:\Projects\Bullet -B"C:\Projects\Bullet CMake" --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_start "C:\Projects\Bullet CMake\CMakeFiles" 42
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\Makefile2 Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/all
mingw32-make.exe[2]: Entering directory `C:/Projects/BULLET~1'
C:/MinGW/bin/mingw32-make.exe -f Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\build.make Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/depend
mingw32-make.exe[3]: Entering directory `C:/Projects/BULLET~1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" C:\Projects\Bullet C:\Projects\Bullet\Demos\OpenGL "C:\Projects\Bullet CMake" "C:\Projects\Bullet CMake\Demos\OpenGL" "C:\Projects\Bullet CMake\Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\DependInfo.cmake" --color=
Dependee "C:\Projects\Bullet CMake\Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\DependInfo.cmake" is newer than depender "C:/Projects/Bullet CMake/Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/depend.internal".
Dependee "C:/Projects/Bullet CMake/Demos/OpenGL/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "C:/Projects/Bullet CMake/Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/depend.internal".
Scanning dependencies of target OpenGLSupport
mingw32-make.exe[3]: Leaving directory `C:/Projects/BULLET~1'
C:/MinGW/bin/mingw32-make.exe -f Demos\OpenGL\CMakeFiles\OpenGLSupport.dir\build.make Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/build
mingw32-make.exe[3]: Entering directory `C:/Projects/BULLET~1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report "C:\Projects\Bullet CMake\CMakeFiles"
[ 0%]
Building CXX object Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/GLDebugFont.obj
cd /d C:\Projects\BULLET~1\Demos\OpenGL && C:\MinGW\bin\g++.exe -DUSE_GRAPHICAL_BENCHMARK -D_IRR_STATIC_LIB_ -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -O3 -DNDEBUG @CMakeFiles/OpenGLSupport.dir/includes_CXX.rsp -o CMakeFiles\OpenGLSupport.dir\GLDebugFont.obj -c C:\Projects\Bullet\Demos\OpenGL\GLDebugFont.cpp
C:\Projects\Bullet\Demos\OpenGL\GLDebugFont.cpp:44:21: fatal error: GL/glut.h: No such file or directory
compilation terminated.
mingw32-make.exe[3]: *** [Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/GLDebugFont.obj] Error 1
mingw32-make.exe[2]: *** [Demos/OpenGL/CMakeFiles/OpenGLSupport.dir/all] Error 2
mingw32-make.exe[1]: *** [Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/rule] Error 2
mingw32-make.exe: *** [Demos/BasicDemo/CMakeFiles/AppBasicDemo.dir/rule] Error 2
mingw32-make.exe[3]: Leaving directory `C:/Projects/BULLET~1'
mingw32-make.exe[2]: Leaving directory `C:/Projects/BULLET~1'
mingw32-make.exe[1]: Leaving directory `C:/Projects/BULLET~1'
Process terminated with status 2 (0 minutes, 2 seconds)
1 errors, 0 warnings
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Bullet in Code::Blocks, Win 7 and MinGW?
You could copy the GL/glut.h and library files into the Bullet/src folder manually, or try fixing the CMakeLists.txt in the root of Bullet so that your platform gets the same special treatment as Visual Studio (use the hard coded path in Bullet/Glut for GL/glut.h).
It shouldn't be hard to fix.
It shouldn't be hard to fix.
-
- Posts: 4
- Joined: Thu Oct 25, 2012 1:35 pm
Re: Bullet in Code::Blocks, Win 7 and MinGW?
Thank you! I got the demos to compile and run. I added these lines to the CMakeLists.txt in the Bullet folder, around line 355, and ran CMake-gui again:
SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut32.lib)
INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/Glut)
Probably not the ideal solution, but it worked (CMake is totally new for me
). Building a demo for the first time in Code::Blocks may still give an error, but pressing the build button a second time seems to make it work.
SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut32.lib)
INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/Glut)
Probably not the ideal solution, but it worked (CMake is totally new for me
