Closed GoogleCodeExporter closed 9 years ago
Hi,
It shouldn't be necessary, as you can see in FindOgre.cmake :
set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${Boost_LIBRARIES})
Then, for every OgreProcedural sample :
target_link_libraries(Sample_Primitives ${OgreProcedural_LIBRARIES}
${OGRE_LIBRARIES} ${OIS_LIBRARIES})
Now, the question is : why FindOgre.cmake doesn't detect Boost in your case?
I'll setup a linux VM and try to reproduce...
Original comment by michael.broutin@gmail.com
on 15 Jul 2013 at 9:31
That line, is only linking to boost threads. The error line I get is because it
can't link to boost system. A couple of lines before that we can see:
"find_package(Boost COMPONENTS thread QUIET)", and that's all inside conditions
about threads.
Either Ogre only needs boost threads or it also needs boost system and it's not
being linked to. Or maybe it's not ogre who needs boosst system but something
else. I'm not sure.
Original comment by kam1k...@gmail.com
on 15 Jul 2013 at 2:06
I found out another way of making it work. See attached file.
Basically I took the "if (OGRE_CONFIG_THREADS)" out of the "if (OGRE_STATIC)"
and added Boost version checks to link to additional libs Boost needs. This
reflects what's dony by "CMake/Dependencies.cmake" on Ogre's tree.
So it's probably FindOgre.cmake that's outdated for linux or recent versions of
boost.
Original comment by kam1k...@gmail.com
on 15 Jul 2013 at 2:51
Attachments:
Ok, I updated FindOGRE.cmake with the latest version from Ogre's source.
Please tell me if the fix is not working.
Original comment by michael.broutin@gmail.com
on 23 Jul 2013 at 8:29
Sorry, it still fails to build the samples without applying the patch.
Full error:
/usr/bin/ld:
CMakeFiles/Sample_Extrusion.dir/__/common/src/BaseApplication.cpp.o: undefined
reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/bin/ld: note: '_ZN5boost6system15system_categoryEv' is defined in DSO
/usr/lib/libboost_system.so.1.54.0 so try adding it to the linker command line
/usr/lib/libboost_system.so.1.54.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Original comment by kam1k...@gmail.com
on 23 Jul 2013 at 11:54
My bad, I just thought you were posting a more recent version of
FindOGRE.cmake... I'll use yours, then.
If the bug is inside FindOGRE.cmake, could you post your patch in Ogre's
bugtracker?
It's always better when the upstream version is correct.
Original comment by michael.broutin@gmail.com
on 24 Jul 2013 at 6:23
I applied your patch, and modified it to merge with latest Ogre's version.
Original comment by michael.broutin@gmail.com
on 24 Jul 2013 at 9:29
I already issued a pull request to Ogre...
Original comment by michael.broutin@gmail.com
on 24 Jul 2013 at 9:47
Original issue reported on code.google.com by
kam1k...@gmail.com
on 11 Jul 2013 at 9:19Attachments: