2
\$\begingroup\$

I have a simple question.

For people that know and built ogre3D from source as a Static library, what is the order of which the libraries should be linked?

The libraries I need to be organized are:

  • Ogre Plugins
  • 'libOgreMain.a'
  • Ogre RenderSystems
  • Boost(version 1.47)link
  • Ogre's Dependencies

The reason I'm asking is because in the Ogre forums, I have asked about this and didn't get a good reply... yet.

The other reason is because even though I link to the boost library, I get this error:

undefined reference to '_imp___ZN5boost6thread20hardware_concurrencyEv'

My compiler is MinGW with CodeBlocks as the IDE.

And my main computer I'm building on is Windows Vista 32 bit.

\$\endgroup\$
1
  • \$\begingroup\$ Also as other information: I used CMake to build the Ogre3D source. \$\endgroup\$
    – Molmasepic
    Jul 28, 2011 at 22:26

1 Answer 1

1
\$\begingroup\$

I didn't know that there were link order dependencies in Ogre's basic SDK build, I certainly never had to rearrange anything on the Windows platform. Are you sure that you're using the right version of Boost?

Another thought, if you're using plugins it's possible that one of them is out of date and needs updating to a matching Boost with a recompile.

Try the compiler option -DBOOST_THREAD_USE_LIB

\$\endgroup\$
4
  • \$\begingroup\$ hm, for -DBOOST_THREAD_USE_LIB, do i put that in the Compiler->Other optons? if so then for some reason that option keeps moving to my #defines options. very wierd..and as of the version, im using many different versions of boost, i guess ill go back and build with boost 1.44 then, since as of now im using boost 1.47 \$\endgroup\$
    – Molmasepic
    Jul 29, 2011 at 3:32
  • \$\begingroup\$ Im starting to think that im not including a certain file or something. as of now the only file i have from boost is boost\thread.hpp. is there more? also im not using the SDK, im using a static library built by me in Cmake \$\endgroup\$
    – Molmasepic
    Jul 29, 2011 at 3:54
  • \$\begingroup\$ You should find a libboost_thread.a ( -lboost_thread ) file in the boost build directories that you need. \$\endgroup\$ Jul 29, 2011 at 4:29
  • \$\begingroup\$ ye theres a libboost_thread, but its not exactly named like that. Its more named libboost_thread_mingw-1_47.a something close to that) should i be renaming the library file? or it doesnt matter? and even so, im already linking to that file. im thinking that theres other files that i need to #include(not link) in order to make this thing work... \$\endgroup\$
    – Molmasepic
    Jul 29, 2011 at 19:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .