# How to build Ogre3d with boost?

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
• Ogre's Dependencies

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.

• Also as other information: I used CMake to build the Ogre3D source. – Molmasepic Jul 28 '11 at 22:26

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.

• 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 – Molmasepic Jul 29 '11 at 3:32
• 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 – Molmasepic Jul 29 '11 at 3:54
• You should find a libboost_thread.a ( -lboost_thread ) file in the boost build directories that you need. – Patrick Hughes Jul 29 '11 at 4:29
• 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... – Molmasepic Jul 29 '11 at 19:14