[Fixed] Compilation fail (WinXP, MinGW)

Demystificator
Posts: 6
Joined: Mon Aug 30, 2010 1:40 pm

[Fixed] Compilation fail (WinXP, MinGW)

Post by Demystificator »

Hi there,

First post and first use of a physics engine.

I want to use Bullet in a Ogre Application. I use MinGW compiler and CodeBlocs IDE.

I followed that article in order to generate makfiles correctly : http://www.technyooz.com/?q=content/com ... er-windows

But when I run mingw32-makefile, I encount this :
E:\Bullet\bullet-2.77>mingw32-make
[ 2%] Built target LinearMath
[ 2%] Built target BulletSoftBodySolvers_CPU
[ 2%] Building CXX object src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/CMake
Files/BulletSoftBodySolvers_DX11.dir/btSoftBodySolver_DX11.obj
In file included from btSoftBodySolver_DX11.h:19:0,
from btSoftBodySolver_DX11.cpp:19:
btSoftBodySolverVertexBuffer_DX11.h:23:20: fatal error: crtdbg.h: No such file o
r directory
compilation terminated.
mingw32-make[2]: *** [src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/CMakeFiles
/BulletSoftBodySolvers_DX11.dir/btSoftBodySolver_DX11.obj] Error 1
mingw32-make[1]: *** [src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/CMakeFiles
/BulletSoftBodySolvers_DX11.dir/all] Error 2
mingw32-make: *** [all] Error 2
Can anyone help me please ?

Thanks for any reply.

PS : I don't know if I post in the good section, feel free to move it or tell me so.
User avatar
Dragonlord
Posts: 198
Joined: Mon Sep 04, 2006 5:31 pm
Location: Switzerland

Re: Compilation fail (WinXP, MinGW)

Post by Dragonlord »

Looks like you did not set up properly the include path. Code::Blocks totally fails at auto-detecting include and lib path so you have to manually set them in the compiler options window. Also which MinGW are you using? Stock with gcc 3.4.x or manually upgraded to gcc 4.5? I'm using 4.5 manual upgrade as I had my troubles with 3.4.x
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Compilation fail (WinXP, MinGW)

Post by Erwin Coumans »

We didn't take MinGW into account when adding Direct Compute GPU accelerated cloth simulation.

We'll fix it asap.
Thanks for the report,
Erwin
Demystificator
Posts: 6
Joined: Mon Aug 30, 2010 1:40 pm

Re: Compilation fail (WinXP, MinGW)

Post by Demystificator »

I don't compile with Code::Blocks. I execute mingw32-make via command line.

I'm using tdm gcc 4.5.0. The binary is 4.5.0 directly, I didn't any upgrades.

So ? I can't use bullet with my application for the moment or is there a way to work despite this ?


Thanks to you, for your working at Bullet. I loved the demos found on the internet and on top of that is an open-source engine, just wonderful.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Compilation fail (WinXP, MinGW)

Post by Erwin Coumans »

Expect some fix very soon, please stay tuned.

In the meanwhile, you could try to disable some settings using cmake-gui, in particular switch off DirectX 11, USE_DX11 and OpenCL related options.
Thanks,
Erwin
User avatar
Dragonlord
Posts: 198
Joined: Mon Sep 04, 2006 5:31 pm
Location: Switzerland

Re: Compilation fail (WinXP, MinGW)

Post by Dragonlord »

Demystificator wrote:I don't compile with Code::Blocks. I execute mingw32-make via command line.

I'm using tdm gcc 4.5.0. The binary is 4.5.0 directly, I didn't any upgrades.

So ? I can't use bullet with my application for the moment or is there a way to work despite this ?
Didn't pay attention to the name of the missing header file. That indeed is one MinGW does not have and never will (legal issues). Concerning mingw32-make it's the same. Code::Blocks uses mingw32-make to build sources so that's why I asked in the first place.
Demystificator
Posts: 6
Joined: Mon Aug 30, 2010 1:40 pm

Re: Compilation fail (WinXP, MinGW)

Post by Demystificator »

I don't exactly remember but I believe that Code::Blocks MinGW version doesn't compile OGRE correctly so I deleted it and download the dragon team's one (recommended by OGRE).

Removing Use of DX11 in CMake seems to fix the problem.

But I got an other error :
[ 93%] Building CXX object Demos/VectorAdd_OpenCL/NVidia/CMakeFiles/AppVectorAdd
_NVidia.dir/__/MiniCL_VectorAdd.obj
..\MiniCL_VectorAdd.cpp:17:21: fatal error: CL/cl.h: No such file or directory
compilation terminated.
mingw32-make[2]: *** [Demos/VectorAdd_OpenCL/NVidia/CMakeFiles/AppVectorAdd_NVid
ia.dir/__/MiniCL_VectorAdd.obj] Error 1
mingw32-make[1]: *** [Demos/VectorAdd_OpenCL/NVidia/CMakeFiles/AppVectorAdd_NVid
ia.dir/all] Error 2
mingw32-make: *** [all] Error 2
Removing BUILD_NVIDIA_OPENCL_DEMOS seems to fix that other error (as it doesn't find the nvidia opencl base directory)

But I got a third error : (Big error message but I'd rather paste it all cause I don't know how to fix it manually)
[ 98%] Building CXX object Extras/Serialize/makesdna/CMakeFiles/makesdna.dir/mak
esdna.obj
makesdna.cpp:62:24: error: expected initializer before 'int8_t'
makesdna.cpp:63:24: error: expected initializer before 'int16_t'
makesdna.cpp:64:24: error: expected initializer before 'int32_t'
makesdna.cpp:65:24: error: expected initializer before 'int64_t'
makesdna.cpp:67:26: error: expected initializer before 'uint8_t'
makesdna.cpp:68:26: error: expected initializer before 'uint16_t'
makesdna.cpp:69:26: error: expected initializer before 'uint32_t'
makesdna.cpp:70:26: error: expected initializer before 'uint64_t'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp:189:1: warning: deprecated conversion from string constant to 'char
*'
makesdna.cpp: In function 'int make_structDNA(char*, FILE*)':
makesdna.cpp:970:20: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:971:21: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:972:21: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:973:22: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:974:19: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:975:20: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:976:21: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:977:21: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:978:22: warning: deprecated conversion from string constant to 'cha
r*'
makesdna.cpp:979:20: warning: deprecated conversion from string constant to 'cha
r*'
mingw32-make[2]: *** [Extras/Serialize/makesdna/CMakeFiles/makesdna.dir/makesdna
.obj] Error 1
mingw32-make[1]: *** [Extras/Serialize/makesdna/CMakeFiles/makesdna.dir/all] Err
or 2
mingw32-make: *** [all] Error 2
I could run some demos though. Guys, it's a really amazing engine !!!
User avatar
Dragonlord
Posts: 198
Joined: Mon Sep 04, 2006 5:31 pm
Location: Switzerland

Re: Compilation fail (WinXP, MinGW)

Post by Dragonlord »

Demystificator wrote:I don't exactly remember but I believe that Code::Blocks MinGW version doesn't compile OGRE correctly so I deleted it and download the dragon team's one (recommended by OGRE).
Actually as mentioned Code::Blocks uses the installed MinGW and uses this make program. So if you can build OGRE with MinGW from a console you can also compile it properly with Code::Blocks. Otherwise Code::Blocks is incorrectly configurated. I've build for my project even external libraries (like the FOX-ToolKit) without any problem and they had been never designed to be compiled with Code::Blocks nor MinGW. And I used even a 64-bit MinGW for this.

What's this "dragon team" version anyways? Never heard of it.
Demystificator
Posts: 6
Joined: Mon Aug 30, 2010 1:40 pm

Re: Compilation fail (WinXP, MinGW)

Post by Demystificator »

http://tdm-gcc.tdragon.net

I don't know compilers well but seems like Ogre don't use the same vector sytem or something like that.
Actually the mingw version given with Code::Blocks didn't compile but this one does. Maybe just a newer version.

Yup Code::Blocks needs to be configurated, I spent weeks to understand how to change little things as I've learnt more about code writting than code compilation or IDE working. Now my Code::Blocks seems fine as long as I know where are libs I want to link to.
User avatar
Dragonlord
Posts: 198
Joined: Mon Sep 04, 2006 5:31 pm
Location: Switzerland

Re: Compilation fail (WinXP, MinGW)

Post by Dragonlord »

Ah yeah, stumbled across that one once too. Is though simply a pre-pack from the files you find on the MinGW Sourceforge page as well as the MinGW64 one. I prefer installing the files myself. I distrust pre-packs a lot since they tend to force choices upon you which don't work outside normed cases (and windows is a totally not normed case).

If you don't want to have troubles with IDEs just use SCons for building. No need for compiler configuration as it works already with MinGW. For the stock MinGW64 you just have to rename a few files as they prefix it in the stock distribution.
Demystificator
Posts: 6
Joined: Mon Aug 30, 2010 1:40 pm

Re: Compilation fail (WinXP, MinGW)

Post by Demystificator »

For the moment I like pre-packs cause they are easier to use and as I develop on Windows. Seems like there is a lack of documentation for Linux for many engines. There a few months ago, OGRE had no documentation for MinGW since 1.6.0 but got it for Visual.

Gonna take a look for SCons, thanks for the advice.

Though, it won't make bullet compile fine ^^
User avatar
Dragonlord
Posts: 198
Joined: Mon Sep 04, 2006 5:31 pm
Location: Switzerland

Re: Compilation fail (WinXP, MinGW)

Post by Dragonlord »

Demystificator wrote:For the moment I like pre-packs cause they are easier to use and as I develop on Windows. Seems like there is a lack of documentation for Linux for many engines. There a few months ago, OGRE had no documentation for MinGW since 1.6.0 but got it for Visual.

Gonna take a look for SCons, thanks for the advice.

Though, it won't make bullet compile fine ^^
Actually compiling under Linux is helluva lot easier. "make && make install" or "scons" is enough to build and install it... that is if the devs are not Linux-illiterates... these unfortunately exist <.=.< (you don't want to know how many messed up build scripts I've seen so far :/ )
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Compilation fail (WinXP, MinGW)

Post by Erwin Coumans »

Latest Bullet-2.77 trunk revision 2189 onwards and updated beta download should compile fine with CMake 2.8.x and MinGW32, try it please:

http://code.google.com/p/bullet/downloads/list

Code: Select all

[ 98%] Building CXX object Extras/Serialize/makesdna/CMakeFiles/makesdna.dir/mak
esdna.obj
makesdna.cpp:62:24: error: expected initializer before 'int8_t'
makesdna should not be compiled: please do not enable additional options in cmake-gui, in particular don't enable INTERNAL_UPDATE_SERIALIZATION_STRUCTURES. Try to use the default cmake-gui options.
And make sure to start from a fresh empty directory when you upgrade to a newer Bullet / cmake build.
Thanks,
Erwin

By the way: Bullet main build system is cmake nowadays, so let's try to get that working for MinGW32 first. Aside from cmake, Bullet supports autotools/automake for Linux and Mac OSX.
Demystificator
Posts: 6
Joined: Mon Aug 30, 2010 1:40 pm

Re: Compilation fail (WinXP, MinGW)

Post by Demystificator »

Well I had to build OGRE samples with CMake and MinGW32 but I didn't encount any problems.

A lot of things are enabled when I launch CMake in the Bullet folder. I just removed DX11 and OPENCL_NVIDIA.

So, going to download the updated beta.

For the moment, I should stay on Windows until I learn Linux use (must be easy but still needs a little of time).

I'll edit this post to let you know if the updated version compiles well.

Thanks and sorry for my "noobiness".

Edit : Well compiled. Thank You !
Last edited by Demystificator on Tue Aug 31, 2010 9:52 pm, edited 1 time in total.
User avatar
Dragonlord
Posts: 198
Joined: Mon Sep 04, 2006 5:31 pm
Location: Switzerland

Re: Compilation fail (WinXP, MinGW)

Post by Dragonlord »

No need to be sorry for that. Everybody once had been a newbie. Just don't become a "n00b" and all is fine :P