gcc compiler, not finding "correct" stdlib.h?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

gcc compiler, not finding "correct" stdlib.h?

Post by ChaiRuiPeng »

so i trying now mostly 3 times today to compile this but no.

after reading for some solutions it came down to a conflicting including of files in the bullet physics library.

when i do

Code: Select all

#include "btBulletCollisionCommon.h"
#include "btBulletDynamicsCommon.h"
in some of my program files

i get this results in 'build log'

Code: Select all

Compiling: source\CMCGlu.cpp
Compiling: source\CTetra.cpp
In file included from ..\..\..\..\..\bullet-2.77\src/LinearMath/btScalar.h:28:0,
                 from ..\..\..\..\..\bullet-2.77\src/LinearMath/btVector3.h:21,
                 from ..\..\..\..\..\bullet-2.77\src/BulletCollision/CollisionDispatch/btCollisionWorld.h:74,
                 from ..\..\..\..\..\bullet-2.77\src/btBulletCollisionCommon.h:22,
                 from C:\Users\Documents\cbprojects\MarCore\source\CTetra.h:25,
                 from C:\Users\Documents\cbprojects\MarCore\source\CTetra.cpp:6:
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:202:22: error: '__gnu_cxx::lldiv_t' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:204:22: error: '__gnu_cxx::_Exit' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:205:22: error: '__gnu_cxx::abs' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:207:22: error: '__gnu_cxx::llabs' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:208:22: error: '__gnu_cxx::div' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:209:22: error: '__gnu_cxx::lldiv' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:211:22: error: '__gnu_cxx::atoll' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:212:22: error: '__gnu_cxx::strtof' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:213:22: error: '__gnu_cxx::strtoll' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:214:22: error: '__gnu_cxx::strtoull' has not been declared
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:215:22: error: '__gnu_cxx::strtold' has not been declared
and i get results this in 'build messages'

Code: Select all

c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|202|error: '__gnu_cxx::lldiv_t' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|204|error: '__gnu_cxx::_Exit' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|205|error: '__gnu_cxx::abs' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|207|error: '__gnu_cxx::llabs' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|208|error: '__gnu_cxx::div' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|209|error: '__gnu_cxx::lldiv' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|211|error: '__gnu_cxx::atoll' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|212|error: '__gnu_cxx::strtof' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|213|error: '__gnu_cxx::strtoll' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|214|error: '__gnu_cxx::strtoull' has not been declared|
c:\mingw32\bin\..\lib\gcc\mingw32\4.5.1\include\c++\cstdlib|215|error: '__gnu_cxx::strtold' has not been declared|
C:\Users\Documents\cbprojects\MarCore\source\CTetra.h|57|error: 'btTetrahedronShapeEx' does not name a type|
i used the google and found that maybe another library is doing

Code: Select all

#include <stdlib.h>
before bullet can 'get to it' so to speaks, and thus they are not being defined properly?

thank you much for reading hope you can help
random
Posts: 158
Joined: Wed Aug 11, 2010 6:01 am

Post by random »

You are using linux?

i dont know if that helps you but did you read this

http://www.gamedev.net/topic/512980-gcc ... -declared/
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

Post by ChaiRuiPeng »

i am not using the linux but i did read that link already the one you posted

it is actually one of the solutions i am trying at the moment.

some more informatoin:

i am compiling with a build of bullet physics libraries: bulletlinearmath and bulletcollision

i am thinking maybe it is a problem with the build of bullet i made.

i will try today to see if i dont include the bullet library depencidies to my project it will compil but thank you for response.
random
Posts: 158
Joined: Wed Aug 11, 2010 6:01 am

Post by random »

i also dont know if that may helps you but the file where the error starts is
C:\Users\Documents\cbprojects\MarCore\source\CTetra.cpp
which i did not found via google...

the first fiile from list shows on line 28

http://www.google.com/codesearch/p?hl=d ... btScalar.h
#include <cstdlib>
but on line 27...
#include <stdlib.h>//size_t for MSVC 6.0
and when i now look at this (first) error line...
c:\mingw32\bin\../lib/gcc/mingw32/4.5.1/include/c++/cstdlib:202:22: error: '__gnu_cxx::lldiv_t' has not been declared
i came to the idea that the problem MAY does not belong to cstdlib at all...

thatfor i googled about stdlib.h size_t msvc error...

http://www.codeguru.com/forum/showthread.php?t=388673

---------------------

still does not know if that will help you, sorry
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

Post by ChaiRuiPeng »

i have removed bullet library depencendies and i no longer get the errosrs.

the culprit is most likely a botched build of the bullet libraries. i will clean up my code and will try with another build of bullet.
Post Reply