Hi, sorry if that is mentioned somewhere already.
i compiled the bullet src, added the libs but as soon as i include <btBulletDynamicsCommon.h>
i get 105 syntax errors in various include files. directories ARE specified correct.
what i can possibly do wrong?
thanks in advance
Include errors?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Include errors?
There has been not such report before, please provide following info:nk47 wrote:Hi, sorry if that is mentioned somewhere already.
i compiled the bullet src, added the libs but as soon as i include <btBulletDynamicsCommon.h>
i get 105 syntax errors in various include files. directories ARE specified correct.
what i can possibly do wrong?
1) which platform, compiler, build system do you use?
When using Visual Studio, you should be able to open the bullet solution file and compile out-of-the-box. Same for CMake on other platforms.
2) which syntax errors? Please copy/paste a few lines of the errors.
Thanks,
Erwin
-
- Posts: 5
- Joined: Sat Apr 05, 2008 1:29 pm
Re: Include errors?
Im on WinXP with MSVS 2005 (SP1).
The SDK compiles totally fine (except few warning) and i bind the compiled release/debug libs no problem.
libbulletcollision.lib
libbulletdynamics.lib
libbulletmath.lib
The errors appear after including <btBulletDynamicsCommon.h>.
The include path is set to bullet path like in the SDK its set to \src\ directory.
Errors are basically syntax errors f.e.
btCollisionObject(); // error C2059: syntax error : ')' e:\bullet\bulletcollision\collisiondispatch\btcollisionobject.h 130
btPersistentManifold(); // error C2059: syntax error : ')' e:\bullet\bulletcollision\narrowphasecollision\btpersistentmanifold.h 69
BT_DECLARE_ALIGNED_ALLOCATOR(); // error C2059: syntax error : 'return' e:\bullet\bulletcollision\collisiondispatch\btcollisionobject.h 93
BT_DECLARE_ALIGNED_ALLOCATOR(); // error C2059: syntax error : 'string' e:\bullet\bulletcollision\collisiondispatch\btcollisionobject.h 93
...
error C2061: syntax error : identifier 'btCollisionObject' e:\bullet\bulletcollision\broadphasecollision\btdispatcher.h 72
error C2062: type 'void' unexpected e:\bullet\bulletcollision\narrowphasecollision\btpersistentmanifold.h 71
error C2065: 'body0' : undeclared identifier e:\bullet\bulletcollision\narrowphasecollision\btpersistentmanifold.h 72
...
It appears like something is not including right even though it should be.
Will go over this one more time ...
The SDK compiles totally fine (except few warning) and i bind the compiled release/debug libs no problem.
libbulletcollision.lib
libbulletdynamics.lib
libbulletmath.lib
The errors appear after including <btBulletDynamicsCommon.h>.
The include path is set to bullet path like in the SDK its set to \src\ directory.
Errors are basically syntax errors f.e.
btCollisionObject(); // error C2059: syntax error : ')' e:\bullet\bulletcollision\collisiondispatch\btcollisionobject.h 130
btPersistentManifold(); // error C2059: syntax error : ')' e:\bullet\bulletcollision\narrowphasecollision\btpersistentmanifold.h 69
BT_DECLARE_ALIGNED_ALLOCATOR(); // error C2059: syntax error : 'return' e:\bullet\bulletcollision\collisiondispatch\btcollisionobject.h 93
BT_DECLARE_ALIGNED_ALLOCATOR(); // error C2059: syntax error : 'string' e:\bullet\bulletcollision\collisiondispatch\btcollisionobject.h 93
...
error C2061: syntax error : identifier 'btCollisionObject' e:\bullet\bulletcollision\broadphasecollision\btdispatcher.h 72
error C2062: type 'void' unexpected e:\bullet\bulletcollision\narrowphasecollision\btpersistentmanifold.h 71
error C2065: 'body0' : undeclared identifier e:\bullet\bulletcollision\narrowphasecollision\btpersistentmanifold.h 72
...
It appears like something is not including right even though it should be.
Will go over this one more time ...
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Include errors?
Haven't seen this before. There might be conflicts in earlier file includes.
Can you make sure to add the Bullet include as first line in your project/cpp file?
Are you using precompiled headerfiles?
Hope this helps,
Erwin
Can you make sure to add the Bullet include as first line in your project/cpp file?
Are you using precompiled headerfiles?
Hope this helps,
Erwin
-
- Posts: 5
- Joined: Sat Apr 05, 2008 1:29 pm
Re: Include errors?
I downloaded SDK again, extracted it and specified include path to bullet \src\ file.
Now it compiles fine.
Maybe just did something wrong before. Sorry for not checking properly before posting.
Thanks alot Erwin! For reply and for this great project!
Now it compiles fine.

Thanks alot Erwin! For reply and for this great project!
-
- Posts: 145
- Joined: Tue Oct 30, 2007 9:23 pm
Re: Include errors?
Gonna guess your compiler was having a hissy fit over the wrong newlines for your system?
Gary (-;
Gary (-;
-
- Posts: 5
- Joined: Sat Apr 05, 2008 1:29 pm
Re: Include errors?
whats that with wrong newlines? i have same errors on another machine.
can't really get the difference between the project setups.
any settings i should be aware of?
can't really get the difference between the project setups.
any settings i should be aware of?
-
- Posts: 5
- Joined: Sat Apr 05, 2008 1:29 pm
Re: Include errors?
solved ...
the errors occurred because of overloaded new operator in debug mode.
release builds always compiled fine. redefined new before including bullet headers in
debug mode and everything went ok.
the errors occurred because of overloaded new operator in debug mode.
release builds always compiled fine. redefined new before including bullet headers in
debug mode and everything went ok.
-
- Posts: 11
- Joined: Mon Nov 02, 2009 11:55 am
Re: Include errors?
I have the same issue with debug/ release builds.solved ...
the errors occurred because of overloaded new operator in debug mode.
release builds always compiled fine. redefined new before including bullet headers in
debug mode and everything went ok.
What do you mean "redifined new"?