Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0


Chronological Thread 
  • From: Wei Li <>
  • To:
  • Subject: Re: [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0
  • Date: Thu, 30 Aug 2012 10:33:48 -0500


On Aug 30, 2012, at 4:57 AM, Laurent Rineau (CGAL/GeometryFactory) wrote:

> Le mercredi 29 août 2012 15:44:24 Wei Li a écrit :
>> I spent two crazy days to configure CGAL for VS2010.
>>
>> My compiler is MSVC10 (runs in Win7 x64). I downloaded Qt4.8.2, CGAL4.0.2,
>> CMake2.8.9, and Boost1.51.0(or 1.50.0), which are all the most recent
>> versions.
>>
>> I followed some online instructions to set things up.
>>
>> With no surprise, CMake cannot find "boost_thread" lib no matter how I set
>> the env_vars and cmake_vars.
>>
>> I dug out a post in Chinese that gave me a probably correct solution, which
>> is to rename all "libboost-xxx" files to "boost-xxx" in ${BOOST_ROOT}/lib
>> directory.
>
> Well, the solution of that post was a wrong idea. libboost-*.lib files are
> static libraries, where as boost-*.lib files are dynamic libraries (that
> need
> the boost-*.dll DLLs at runtime in the PATH).
>
> If you have downloaded the static libraries of Boost, and only those, then
> you
> need to switch the CMake variable CGAL_Boost_USE_STATIC_LIBS to "TRUE".

Yea, I'll try this.

>
>> OK. Then I was able to get the "CGAL.sln" solution file. But when I tried
>> to
>> compile it in VC++2010 express, a new problem came. It seemed that some
>> symbols are unrecognized? (I'm not sure about this)
>>
>> Here is the message in VC++2010express:
>> "1>------ Build started: Project: ZERO_CHECK, Configuration: Release Win32
>> ------ 2>------ Build started: Project: CGAL, Configuration: Release Win32
>> ------ 2> Creating library I:/Program
>> Files/CGAL-4.0.2/lib/Release/CGAL-vc100-mt-4.0.2.lib and object I:/Program
>> Files/CGAL-4.0.2/lib/Release/CGAL-vc100-mt-4.0.2.exp 2>all_files.obj :
>> warning LNK4217: locally defined symbol
>> ?set_tss_data@detail@boost@@YAXPBXV?$shared_ptr@Utss_cleanup_function@detai
>> l@boost@@@2@PAX_N@Z (void __cdecl boost::detail::set_tss_data(void const
>> *,class boost::shared_ptr<struct boost::detail::tss_cleanup_function>,void
>> *,bool)) imported in function "public: __thiscall
>> boost::thread_specific_ptr<int>::~thread_specific_ptr<int>(void)"
>> (??1?$thread_specific_ptr@H@boost@@QAE@XZ)
>
> This warning is a consequence off your use of static Boost libraries in a
> configuration where dynamic Boost libraries were expected.
>
>> 2>boost_thread-vc100-mt-1_50.lib(thread.obj) : error LNK2019: unresolved
>> external symbol "public: static class boost::chrono::time_point<class
>> boost::chrono::system_clock,class boost::chrono::duration<__int64,class
>> boost::ratio<1,10000000> > > __cdecl
>> boost::chrono::system_clock::now(void)"
>> (?now@system_clock@chrono@boost@@SA?AV?$time_point@Vsystem_clock@chrono@boo
>> st@@V?$duration@_JV?$ratio@$00$0JIJGIA@@boost@@@23@@23@XZ) referenced in
>> function "public: bool __thiscall boost::thread::try_join_until(class
>> boost::chrono::time_point<class boost::chrono::system_clock,class
>> boost::chrono::duration<__int64,class boost::ratio<1,1000000000> > > const
>> &)"
>> (?try_join_until@thread@boost@@QAE_NABV?$time_point@Vsystem_clock@chrono@bo
>> ost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z)
>
> That is a linker error. It seems that Boost.Thread, on Windows, from
> Boost 1.50.0, does require to link with Boost.Chrono and Boost.System. What
> I
> do not understand is that, on Windows, the auto-linking feature of Boost
> libraries should have make the CGAL libraries linked with the needed Boost
> libraries. Have you disabled the auto-linking feature of Boost with special
> CMake variables? Or maybe the missing symbols are another consequence of
> your
> renaming of static libraries to shared libraries.

I didn't change the auto-linking feature.
The only variables I set/changed were BOOST_ROOT and the filepath to
qmake.exe of qt4.

>
>> This problem is far beyond my ability. As a result, I turn back to older
>> versions of CGAL (3.9.0) and Boost (1.47.0). I use exactly the same setup
>> procedure, and everything goes well till now.
>>
>> I think there is a problem if we want to use some current versions of CGAL
>> and Boost together.
>>
>> I also have a suggestion:
>> Since CGAL desperately depends on Boost, please specifically list which
>> versions of Boost are required by each version of CGAL. BTW, the
>> installation manual says that CGAL4.0.2 requires Boost 1.39.0 or newer, but
>> it definitely cannot work with Boost 1.50.0 or 1.51.0, which are of course
>> newer than 1.39.0.
>
> You are right. We will publish the list of versions that were tested at the
> date of the publication of a new CGAL release. Boost 1.50.0 and latter were
> not tested with CGAL-4.0.2. CGAL-4.1 does support Boost 1.50.0, but was not
> tested with Boost 1.51.0.

GRRRR...I should have tried the newest beta version.

Thank you very much for your solution. I'll post the result after I try it
sooner.

>
> --
> Laurent Rineau, PhD
> R&D Engineer at GeometryFactory http://www.geometryfactory.com/
> Release Manager of the CGAL Project http://www.cgal.org/
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>




Archive powered by MHonArc 2.6.18.

Top of Page