[SOLVED] Eclipse:OgreBulletDynamicsRigidBody.h: No such file

IreneLing

05-03-2014 03:00:39

I followed this thread http://www.ogre3d.org/addonforums/viewtopic.php?f=12&t=13000(Thanks to the author) to install bullet and OgreBullet (expect that I didn't change the path)

And now I have bullet folder and OgreBullet folder under /usr/local/include. , and also /usr/include.

Before I install OgreBulletwhen I try to compile it keeps show error that xxx.h not found , and after that I found someone suggested that move files inside the 'bullet' folder under /usr/local/include , and it solves the problem,but now it's OgreBullet's turn,not sure if any mistake is made.

From the OgreBullet Tutorial 1, OgreBulletDynamicsRigidBody is included,and I also added two paths :
/usr/local/include/OgreBullet/Collisions
/usr/local/include/OgreBullet/Dynamics
under "Paths & Symbol".

#include "ExampleApplication.h"
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#include "../res/resource.h"
#endif
#include "OgreBulletDynamicsRigidBody.h" // for OgreBullet
#include "Shapes/OgreBulletCollisionsStaticPlaneShape.h" // for static planes
#include "Shapes/OgreBulletCollisionsBoxShape.h" // for Boxes


The CMakeFile: (not sure how to add the directory path)
set(HDRS
./ExampleApplication.h
./OgreBullet_Collision_test.h
)

set(SRCS
./OgreBullet_Collision_test.cpp
)

include_directories( ${OIS_INCLUDE_DIRS}
${OGRE_INCLUDE_DIRS}
${OGRE_SAMPLES_INCLUDEPATH}
)


Console:
11:14:18 **** Incremental Build of configuration Default for project ogre ****
make all
CMake Warning (dev) in CMakeLists.txt:
A logical block opening on the line

/home/emc/ogre/clean_ogre/CMakeLists.txt:29 (if)

closes on the line

/home/emc/ogre/clean_ogre/CMakeLists.txt:41 (endif)
-- Looking for OGRE...

with mis-matching arguments.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Ogre Byatis (1.8.1)
-- Found OGRE: optimized;/usr/local/lib/libOgreMain.so;debug;/usr/local/lib/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/local/lib/libOgrePaging.so;debug;/usr/local/lib/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/local/lib/libOgreTerrain.so;debug;/usr/local/lib/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/local/lib/libOgreProperty.so;debug;/usr/local/lib/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/local/lib/libOgreRTShaderSystem.so;debug;/usr/local/lib/libOgreRTShaderSystem.so
-- Looking for OIS...
-- Found OIS: optimized;/usr/lib/libOIS.so;debug;/usr/lib/libOIS.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/emc/ogre/ogretestbuild
[100%] Building CXX object CMakeFiles/OgreApp.dir/OgreBullet_Collision_test.cpp.o
In file included from /home/emc/ogre/clean_ogre/OgreBullet_Collision_test.cpp:1:0:
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:9:64: fatal error: OgreBulletDynamicsRigidBody.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/OgreApp.dir/OgreBullet_Collision_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/OgreApp.dir/all] Error 2
make: *** [all] Error 2

11:14:21 Build Finished (took 2s.835ms)


Is there anything wrong with my code or paths? I did restart,rebuild everything but still the same.
Thank you.

AlexeyKnyshev

05-03-2014 11:27:57

No sure (I'm not at workstation now), but try to add /usr/include/OgreBullet folder to include paths. Make sure where's OgreBulletDynamicsRigidBody.h located.

You can find it by running this sh command (in terminal):
find /usr/include -name OgreBulletDynamicsRigidBody.h

Add output path dir to your project includes.

Best regards, Alexey Knyshev

IreneLing

05-03-2014 12:45:43

No sure (I'm not at workstation now), but try to add /usr/include/OgreBullet folder to include paths. Make sure where's OgreBulletDynamicsRigidBody.h located.

You can find it by running this sh command (in terminal):
find /usr/include -name OgreBulletDynamicsRigidBody.h

Add output path dir to your project includes.


Thanks for your help.

I found my OgreBulletDynamicsRigidBody.h under /usr/include/OgreBullet/Dynamics/OgreBulletDynamicsRigidBody.h

So I changed my includes to #include "/usr/include/OgreBullet/Dynamics/OgreBulletDynamicsRigidBody.h"

And also added /usr/include/OgreBullet folder to include paths.

And there is another missing file:

20:39:44 **** Incremental Build of configuration Default for project ogre ****
make all
[100%] Building CXX object CMakeFiles/OgreApp.dir/OgreBullet_Collision_test.cpp.o
In file included from /usr/include/OgreBullet/Dynamics/OgreBulletDynamicsRigidBody.h:34:0,
from /home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:9,
from /home/emc/ogre/clean_ogre/OgreBullet_Collision_test.cpp:1:
/usr/include/OgreBullet/Dynamics/OgreBulletDynamicsPreRequisites.h:38:34: fatal error: OgreBulletCollisions.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/OgreApp.dir/OgreBullet_Collision_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/OgreApp.dir/all] Error 2
make: *** [all] Error 2

20:39:47 Build Finished (took 2s.820ms)



I checked and the OgreBulletCollisions.h is at /usr/include/OgreBullet/Collisions/OgreBulletCollisions.h , and the include paths of OgreBulletDynamicsPreRequisites.h is just #include "OgreBulletCollisions.h", it seems it unable to read files from other folder.

Thank you.

AlexeyKnyshev

05-03-2014 22:46:14

So, u should add each dir containing not found file to include path

IreneLing

06-03-2014 18:15:20

So, u should add each dir containing not found file to include path

Thanks for your reply again.

Yes I already added the path to includes,but still not found.

[attachment=1]1.png[/attachment]

[attachment=0]2.jpg[/attachment]

BTW,I tried to move all the files from Collisions and Dynamics folders,then put under /usr/local/include (my system seems to read bullet files from /usr/local/include),and it seems the files able to be found(I think this way is incorrect,it's so messy),however here is another error:

02:11:52 **** Incremental Build of configuration Default for project ogre ****
make all
[100%] Building CXX object CMakeFiles/OgreApp.dir/OgreBullet_Collision_test.cpp.o
In file included from /home/emc/ogre/clean_ogre/OgreBullet_Collision_test.cpp:1:0:
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h: In member function ‘virtual void OgreBullet_Collision_testApp::createFrameListener()’:
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:238:58: error: no matching function for call to ‘OgreBullet_Collision_testFrameListener::OgreBullet_Collision_testFrameListener(Ogre::SceneManager*&, Ogre::RenderWindow*&, Ogre::Camera*&, Ogre::Vector3, Ogre::AxisAlignedBox)’
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:238:58: note: candidates are:
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:26:6: note: OgreBullet_Collision_testFrameListener::OgreBullet_Collision_testFrameListener(Ogre::SceneManager*, Ogre::RenderWindow*, Ogre::Camera*, Ogre::Vector3&, Ogre::AxisAlignedBox&)
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:26:6: note: no known conversion for argument 4 from ‘Ogre::Vector3’ to ‘Ogre::Vector3&’
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:14:8: note: OgreBullet_Collision_testFrameListener::OgreBullet_Collision_testFrameListener(const OgreBullet_Collision_testFrameListener&)
/home/emc/ogre/clean_ogre/OgreBullet_Collision_test.h:14:8: note: candidate expects 1 argument, 5 provided
make[2]: *** [CMakeFiles/OgreApp.dir/OgreBullet_Collision_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/OgreApp.dir/all] Error 2
make: *** [all] Error 2

02:11:59 Build Finished (took 6s.922ms)



And also,am I added the bullet libraries correctly?I just simply click Add,and paste the library name,I guess it's incorrect as well?

Thank you.

AlexeyKnyshev

06-03-2014 22:23:16

Samples are broken, don't try to build them. I have no time to fix em up. :(

IreneLing

07-03-2014 20:58:54

Samples are broken, don't try to build them. I have no time to fix em up. :(

I see,thanks for inform.

BTW I just managed to add include path by edit the CMakeList,just include path in Eclipse seems not working.

Thanks for your assist.

AlexeyKnyshev

08-03-2014 21:49:17

Looks like eclipse simply runs cmake and make sequence. If it's truth, paths set up in eclipse project options make no sense, btw as expected.

IreneLing

13-03-2014 09:38:49

Looks like eclipse simply runs cmake and make sequence. If it's truth, paths set up in eclipse project options make no sense, btw as expected.

Yes,I'm new to Eclipse so not really know what's the issue,but glad I found the solution which really made my day :D