thegorgatron
30-03-2011 06:54:22
I'm trying to compile tutorial 2 and I'm getting this error.
I'm pretty lost as to where to begin on this one.
Any ideas on how to resolve this?
Thanks
1>------ Build started: Project: OgreBullet_Collision_test, Configuration: Debug Win32 ------
1>Linking...
1>OIS_d.lib(OIS_d.dll) : error LNK2005: "public: class OIS::MouseState const & __thiscall OIS::Mouse::getMouseState(void)const " (?getMouseState@Mouse@OIS@@QBEABVMouseState@2@XZ) already defined in BaseApplication.obj
1> Creating library bin\Debug\OgreBullet_Collision_test.lib and object bin\Debug\OgreBullet_Collision_test.exp
1>bin\Debug\OgreBullet_Collision_test.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://c:\Users\Erik\Documents\Visual Studio 2008\Projects\OgreBullet_Collision_test\OgreBullet_Collision_test\obj\Debug\BuildLog.htm"
1>OgreBullet_Collision_test - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
dermont
30-03-2011 09:53:36
Hi since I haven't built OgreBullet on Windows I'm guessing your problem may be that you trying to mix the BaseApplication tutorial framework with the ExampleApplication/Listener that the tutorial uses.
Attached is the demo using the BaseApplication framework; it's for Linuc but should run on Windows.
censor
20-04-2012 16:34:06
I have a similar problem with OgreBullet Tutorial 2 on two different computers (32-bit with Ogre 1.7.4 SDK and 64-bit with Ogre 1.7.3 custom-built from source for 64-bit). The release version builds and runs, boxes can be thrown onto a plane. The debug version won't build under MS Visual C++ 2010 Professional, says 1>------ Build started: Project: OgreBullet_Collision_test, Configuration: Debug Win32 ------
1> OgreBullet_Collision_test.cpp
1>c:\ogre\ogresdk_vc10_v1-7-4\include\ogre\exampleframelistener.h(343): warning C4244: '+=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\ogre\ogresdk_vc10_v1-7-4\include\ogre\exampleframelistener.h(344): warning C4244: '-=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\ogre\ogresdk_vc10_v1-7-4\include\ogre\exampleframelistener.h(348): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\ogre\ogresdk_vc10_v1-7-4\include\ogre\exampleframelistener.h(349): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\ogre\ogresdk_vc10_v1-7-4\include\ogre\exampleframelistener.h(454): warning C4244: '-=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1> BaseApplication.cpp
1> Generating Code...
1>OIS_d.lib(OIS_d.dll) : error LNK2005: "public: class OIS::MouseState const & __thiscall OIS::Mouse::getMouseState(void)const " (?getMouseState@Mouse@OIS@@QBEABVMouseState@2@XZ) already defined in BaseApplication.obj
1> Creating library bin\Debug\OgreBullet_Collision_test.lib and object bin\Debug\OgreBullet_Collision_test.exp
1>bin\Debug\\OgreBullet_Collision_test.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
nslaver
26-06-2012 10:44:35
It's linker errors. Just try include OIS.lib.
MikeCyber
19-07-2012 09:58:28
Hi, on Linx/Eclipse I get:
----
make all
Building file: ../OgreBullet_Collision_test.cpp
Invoking: Cross G++ Compiler
g++ -I"/home/michael/OGRE/ogre_src_v1-8-0/OgreMain/include" -I/usr/local/include/OgreBullet/Dynamics -I/usr/local/include/OgreBullet/Collisions -I/usr/local/include/OgreBullet -I/usr/local/include/bullet -I"/home/michael/OGRE/ogre_src_v1-8-0/build/include" -I"/home/michael/OGRE/ogre_src_v1-8-0/include" -I"/home/michael/OGRE/ogre_src_v1-8-0/Samples/Common/include" -I/usr/include/OIS -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"OgreBullet_Collision_test.d" -MT"OgreBullet_Collision_test.d" -o "OgreBullet_Collision_test.o" "../OgreBullet_Collision_test.cpp"
In file included from ../OgreBullet_Collision_test.cpp:21:0:
../OgreBullet_Collision_test.h: In member function ‘virtual void OgreBullet_Collision_testApp::createFrameListener()’:
../OgreBullet_Collision_test.h:257:58: error: no matching function for call to ‘OgreBullet_Collision_testFrameListener::OgreBullet_Collision_testFrameListener(Ogre::SceneManager*&, Ogre::RenderWindow*&, Ogre::Camera*&, Ogre::Vector3, Ogre::AxisAlignedBox)’
../OgreBullet_Collision_test.h:257:58: note: candidates are:
../OgreBullet_Collision_test.h:45:6: note: OgreBullet_Collision_testFrameListener::OgreBullet_Collision_testFrameListener(Ogre::SceneManager*, Ogre::RenderWindow*, Ogre::Camera*, Ogre::Vector3&, Ogre::AxisAlignedBox&)
../OgreBullet_Collision_test.h:45:6: note: no known conversion for argument 4 from ‘Ogre::Vector3’ to ‘Ogre::Vector3&’
../OgreBullet_Collision_test.h:33:8: note: OgreBullet_Collision_testFrameListener::OgreBullet_Collision_testFrameListener(const OgreBullet_Collision_testFrameListener&)
../OgreBullet_Collision_test.h:33:8: note: candidate expects 1 argument, 5 provided
make: *** [OgreBullet_Collision_test.o] Error 1
---
Many thanks
Michael
dermont
19-07-2012 10:39:56
Change the framelistener ctor to:
OgreBullet_Collision_testFrameListener(
SceneManager *sceneMgr,
RenderWindow* win,
Camera* cam,
Vector3 gravityVector,
AxisAlignedBox bounds)
And update your resources.cfg file to include paths to media:
[Bootstrap]
Zip=/media/sda8/Libraries/OGRE/src/v1-6/Samples/Media/packs/OgreCore.zip
[Bullet]
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/materials/programs
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/materials/scripts
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/fonts
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/textures
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/materials
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/models
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/overlays
FileSystem=/media/sda8/Libraries/OGRE/ogre-addons/ogrebullet_src/Demos/Media/gui
Can't remember if OgreCore.zip is needed or shipped with OgreBullet. If yes and no you can get it from here:
http://ogre.svn.sourceforge.net/viewvc/ ... p?view=log
With regards your -Bstatic query on the main forum, it is pretty much as you said. When linking if you only have the bullet static libs installed It should automatically link against then. You probably only need to do this if you have both static/shared libs installed and want to select the appropriate libs. Sorry don't know anything about Eclipse.