[SOLVED] Visual Studio link error

Smok3Gun

28-10-2013 14:33:18

Hi guys,
First of all i'm sorry for my poor english, i'm french.
I try to use OgreBullet in my project and i always have a link error :

error LNK2019: symbole externe non résolu "public: __cdecl OgreBulletDynamics::DynamicsWorld::DynamicsWorld(class Ogre::SceneManager *,class Ogre::AxisAlignedBox const &,class Ogre::Vector3 const &,bool,bool,unsigned int)" (??0DynamicsWorld@OgreBulletDynamics@@QEAA@PEAVSceneManager@Ogre@@AEBVAxisAlignedBox@3@AEBVVector3@3@_N3I@Z) référencé dans la fonction "public: bool __cdecl Base_App::start(void)" (?start@Base_App@@QEAA_NXZ)

Here is the code that i add in my project :

In my header file :
Ogre::Vector3 gravityVector;
Ogre::AxisAlignedBox bounds;
OgreBulletDynamics::DynamicsWorld *mWorld;
OgreBulletCollisions::DebugDrawer *debugDrawer;


And in my cpp file :
-constructor :

Base_App::Base_App(void) : mRoot(0), ninja(0), character(0), mWindow(0), mSceneMgr(0), mCamera(0), mPlatform(0), mGUI(0), mInputManager(0), mMouse(0), mKeyboard(0),
gravityVector(Ogre::Vector3(0,-9.81,0)),
bounds(Ogre::AxisAlignedBox (Ogre::Vector3 (-10000, -10000, -10000), //aligned box for Bullet
Ogre::Vector3 (10000, 10000, 10000)))

-and
mWorld = new OgreBulletDynamics::DynamicsWorld(mSceneMgr, bounds, gravityVector);

Thanks you for your aswers

AlexeyKnyshev

30-10-2013 09:55:43

Are u using prebuild OgreBullet? Or u built it from src with CMake?

Smok3Gun

31-10-2013 17:05:41

I built it with CMake.

I have the .libs files but Visual Studio doesnt find them

AlexeyKnyshev

01-11-2013 08:48:30

Seems to be wrong project setup? Library link path are right? Check linker command line options and post there.

Smok3Gun

03-11-2013 19:32:20

Here is the linker command line :
/OUT:"Debug\OgreProject.exe"
/MANIFEST
/NXCOMPAT
/PDB:"Debug\OgreProject.pdb"
/DYNAMICBASE "OgreMain_d.lib" "OIS_d.lib" "MyGUI.OgrePlatform_d.lib" "MyGUIEngineStatic_d.lib" "freetype_d.lib" "OgreBulletCollisions_d.lib" "OgreBulletDynamics_d.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
/DEBUG /MACHINE:X64 /INCREMENTAL
/PGD:"Debug\OgreProject.pgd" /SUBSYSTEM:WINDOWS
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"intermediaire\Debug\OgreProject.exe.intermediate.manifest"
/ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"E:\DEV\BULLET\OgreBullet\lib\Debug"
/LIBPATH:"E:\DEV\MYGUI\MyGUI_install\lib\Debug" /LIBPATH:"E:\DEV\OGRE\OgreSDK\lib" /LIBPATH:"E:\DEV\OGRE\OgreSDK\lib\Debug" /TLBID:1

AlexeyKnyshev

03-11-2013 20:41:20

Looks like path to OgreBullet libs is not added to libpath. Try to add it.

Smok3Gun

04-11-2013 17:48:54

The path is already here no ?
/LIBPATH:"E:\DEV\BULLET\OgreBullet\lib\Debug"

Smok3Gun

06-11-2013 20:36:27

Please if someone can answer me, i really need help, my .lib files are in the good folder and the path is right.

AlexeyKnyshev

06-11-2013 21:38:29

Have you successfully build samples for ogre bullet? When I want to find the root of problem. I disable components and enable them one by one until finding bastard.

I think you should try to link bullet libraries in addition to ogre bullet (It might be not truth because I don't know how you built ogre bullet and bullet).

Smok3Gun

07-11-2013 17:59:04

I also try to add bullet libs and it doesnt work.
For build OgreBullet i follow this tuto : viewtopic.php?f=12&t=29787 but i dont have the boost ( i dont know if it's important or not )
I dont build the demo of OgreBullet because I had a lot of errors with BetaGui.

EDIT: Should i try your version of OgreBullet ?

AlexeyKnyshev

08-11-2013 13:27:15

I also try to add bullet libs and it doesnt work.
For build OgreBullet i follow this tuto : viewtopic.php?f=12&t=29787 but i dont have the boost ( i dont know if it's important or not )
I dont build the demo of OgreBullet because I had a lot of errors with BetaGui.

EDIT: Should i try your version of OgreBullet ?


You may try to do that. I'd help you if I can. You are welcome.

Smok3Gun

08-11-2013 18:38:55

For use yours, i only have to use cmake for compile OgreBullet ?

AlexeyKnyshev

08-11-2013 19:49:33

You need Bullet build with ConvexDecomposition support.

Smok3Gun

08-11-2013 19:59:20

You need Bullet build with ConvexDecomposition support.
And how can i do it ?

EDIT: I have ConvexDecomposition.lib so is it right ?

AlexeyKnyshev

09-11-2013 03:40:40

Seems to be.

Smok3Gun

09-11-2013 09:12:00

So i downloaded your OgreBullet, and when i configure it with Cmake I have errors, it doesnt find bullet but it find Ogre :

CMake Error at D:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find Gui3D (missing: Gui3D_INCLUDE_DIR)
Call Stack (most recent call first):
D:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
Demos/cmake/FindGui3D.cmake:24 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
Demos/CMakeLists.txt:12 (find_package)


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
BULLET_INCLUDE_COLLISION_DIR (ADVANCED)
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
BULLET_INCLUDE_CONVEXDECOMPOSITION_DIR (ADVANCED)
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
BULLET_INCLUDE_DIR
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
BULLET_INCLUDE_DYNAMICS_DIR (ADVANCED)
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
BULLET_INCLUDE_LINEARMATH_DIR (ADVANCED)
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
BULLET_INCLUDE_SOFTBODY_DIR (ADVANCED)
used as include directory in directory E:/DEV/BULLET/alexeyknyshev
used as include directory in directory E:/DEV/BULLET/alexeyknyshev

AlexeyKnyshev

09-11-2013 20:47:36

Set OgreBullet_BUILD_DEMOS to false in cmake. (-DOgreBullet_BUILD_DEMOS=FALSE in cmake command line options or trigger checkbox for this variable in cmake-gui)

Smok3Gun

09-11-2013 21:23:49

Ok I'll try it.

EDIT: Cmake works, now im compiling OgreBullet

EDIT2 : I compiled OgreBullet, I try again to compile my project

EDIT3 : It's working !!! But is it normal that debug libs are called "OgreBulletCollisions.lib" and "OgreBulletDynamics.lib" ? :|

AlexeyKnyshev

10-11-2013 06:09:17

For me (I'm Linux user) it's normal. Are you suggesting to add _d postfix for lib names for Windows? Have you successfully run any bullet simulator based on Ogre/OgreBullet?
P.s. Don't forget about kudos ;-)

Smok3Gun

10-11-2013 12:35:34

All the windows libraries that i used have _d postfix on the debug lib name so i thought i did wrong compilation ^^"
My code compiles so i think it's good

AlexeyKnyshev

10-11-2013 13:38:48

Good for you. I'm quite happy about it. Please post there or on bitbucket any issues that u will find.

P.s. If it wouldn't hard for you, please mark this topic as [SOLVED] before old topic name.

capturesteve

04-09-2014 03:17:15

I am seeing the following.


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
BULLET_INCLUDE_CONVEXDECOMPOSITION_DIR (ADVANCED)
used as include directory in directory /home/steven/ogre_proj/ogrebullet
used as include directory in directory /home/steven/ogre_proj/ogrebullet
used as include directory in directory /home/steven/ogre_proj/ogrebullet


I imagine my bullet installation does not have ConvexDecomposition? I haven't seen anything about this on Bullets website being a separate build version or download? How do I get a bullet version with ConvexDecomposition?

AlexeyKnyshev

06-09-2014 18:58:36

In any situation u can build bullet with convexdecomposition support by yourself.