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:22:55 -0500
Thank you.
I don't have chance to try your solution right now, but it seems to make a
lot of sense.
Wei Li
On Aug 29, 2012, at 7:33 PM, Philipp Moeller wrote:
> Wei Li
> <>
> writes:
>
>> 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.
>
> As of Boost 1.50 Boost.Threads needs to be linked against Boost.System
> as well, this is not taken into account by the CGAL 4.0.2 cmake
> configuration.
>
>
>> 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.
>>
>> 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
>> 2>
>> ?set_tss_data@detail@boost@@YAXPBXV?$shared_ptr@Utss_cleanup_function@detail@boost@@@2@PAX_N@Z
>> 2> (void __cdecl boost::detail::set_tss_data(void const *,class
>> 2> boost::shared_ptr<struct boost::detail::tss_cleanup_function>,void
>> 2> *,bool)) imported in function "public: __thiscall
>> 2> boost::thread_specific_ptr<int>::~thread_specific_ptr<int>(void)"
>> 2> (??1?$thread_specific_ptr@H@boost@@QAE@XZ)
>> 2>all_files.obj : warning LNK4217: locally defined symbol
>> 2> ?generic_category@system@boost@@YAABVerror_category@12@XZ (class
>> 2> boost::system::error_category const & __cdecl
>> 2> boost::system::generic_category(void)) imported in function "void
>> 2> __cdecl boost::system::`dynamic initializer for
>> 2> posix_category''(void)" (??__Eposix_category@system@boost@@YAXXZ)
>> 2>all_files.obj : warning LNK4217: locally defined symbol
>> 2> ?system_category@system@boost@@YAABVerror_category@12@XZ (class
>> 2> boost::system::error_category const & __cdecl
>> 2> boost::system::system_category(void)) imported in function "void
>> 2> __cdecl boost::system::`dynamic initializer for
>> 2> native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ)
>> 2>boost_thread-vc100-mt-1_50.lib(thread.obj) : error LNK2019:
>> 2> unresolved external symbol "public: static class
>> 2> boost::chrono::time_point<class boost::chrono::system_clock,class
>> 2> boost::chrono::duration<__int64,class boost::ratio<1,10000000> > >
>> 2> __cdecl boost::chrono::system_clock::now(void)"
>> 2>
>> (?now@system_clock@chrono@boost@@SA?AV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0JIJGIA@@boost@@@23@@23@XZ)
>> 2> referenced in function "public: bool __thiscall
>> 2> boost::thread::try_join_until(class boost::chrono::time_point<class
>> 2> boost::chrono::system_clock,class
>> 2> boost::chrono::duration<__int64,class boost::ratio<1,1000000000> >
>> 2> > const &)"
>> 2>
>> (?try_join_until@thread@boost@@QAE_NABV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z)
>> 2>I:\Program Files\CGAL-4.0.2\bin\Release\CGAL-vc100-mt-4.0.2.dll : fatal
>> error LNK1120: 1 unresolved externals
>> 3>------ Build started: Project: CGAL_Core, Configuration: Release Win32
>> ------
>> 4>------ Build started: Project: CGAL_ImageIO, Configuration: Release
>> Win32 ------
>> 5>------ Build started: Project: CGAL_Qt4, Configuration: Release Win32
>> ------
>> 3> Creating library I:/Program
>> Files/CGAL-4.0.2/lib/Release/CGAL_Core-vc100-mt-4.0.2.lib and object
>> I:/Program Files/CGAL-4.0.2/lib/Release/CGAL_Core-vc100-mt-4.0.2.exp
>> 3> CGAL_Core.vcxproj -> I:\Program
>> Files\CGAL-4.0.2\bin\Release\CGAL_Core-vc100-mt-4.0.2.dll
>> 4> Creating library I:/Program
>> Files/CGAL-4.0.2/lib/Release/CGAL_ImageIO-vc100-mt-4.0.2.lib and object
>> I:/Program Files/CGAL-4.0.2/lib/Release/CGAL_ImageIO-vc100-mt-4.0.2.exp
>> 4>all_files.obj : warning LNK4217: locally defined symbol
>> 4> ?generic_category@system@boost@@YAABVerror_category@12@XZ (class
>> 4> boost::system::error_category const & __cdecl
>> 4> boost::system::generic_category(void)) imported in function "void
>> 4> __cdecl boost::system::`dynamic initializer for
>> 4> posix_category''(void)" (??__Eposix_category@system@boost@@YAXXZ)
>> 4>all_files.obj : warning LNK4217: locally defined symbol
>> 4> ?system_category@system@boost@@YAABVerror_category@12@XZ (class
>> 4> boost::system::error_category const & __cdecl
>> 4> boost::system::system_category(void)) imported in function "void
>> 4> __cdecl boost::system::`dynamic initializer for
>> 4> native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ)
>> 4>boost_thread-vc100-mt-1_50.lib(thread.obj) : error LNK2019:
>> 4> unresolved external symbol "public: static class
>> 4> boost::chrono::time_point<class boost::chrono::system_clock,class
>> 4> boost::chrono::duration<__int64,class boost::ratio<1,10000000> > >
>> 4> __cdecl boost::chrono::system_clock::now(void)"
>> 4>
>> (?now@system_clock@chrono@boost@@SA?AV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0JIJGIA@@boost@@@23@@23@XZ)
>> 4> referenced in function "public: bool __thiscall
>> 4> boost::thread::try_join_until(class boost::chrono::time_point<class
>> 4> boost::chrono::system_clock,class
>> 4> boost::chrono::duration<__int64,class boost::ratio<1,1000000000> >
>> 4> > const &)"
>> 4>
>> (?try_join_until@thread@boost@@QAE_NABV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z)
>> 4>I:\Program Files\CGAL-4.0.2\bin\Release\CGAL_ImageIO-vc100-mt-4.0.2.dll
>> : fatal error LNK1120: 1 unresolved externals
>> 3> 1 file(s) copied.
>> 3> 1 file(s) copied.
>> 5> Creating library I:/Program
>> Files/CGAL-4.0.2/lib/Release/CGAL_Qt4-vc100-mt-4.0.2.lib and object
>> I:/Program Files/CGAL-4.0.2/lib/Release/CGAL_Qt4-vc100-mt-4.0.2.exp
>> 5>all_files.obj : warning LNK4217: locally defined symbol
>> 5> ?generic_category@system@boost@@YAABVerror_category@12@XZ (class
>> 5> boost::system::error_category const & __cdecl
>> 5> boost::system::generic_category(void)) imported in function "void
>> 5> __cdecl boost::system::`dynamic initializer for
>> 5> posix_category''(void)" (??__Eposix_category@system@boost@@YAXXZ)
>> 5>moc_GraphicsItem.obj : warning LNK4049: locally defined symbol
>> ?generic_category@system@boost@@YAABVerror_category@12@XZ (class
>> boost::system::error_category const & __cdecl
>> boost::system::generic_category(void)) imported
>> 5>moc_GraphicsViewInput.obj : warning LNK4049: locally defined symbol
>> ?generic_category@system@boost@@YAABVerror_category@12@XZ (class
>> boost::system::error_category const & __cdecl
>> boost::system::generic_category(void)) imported
>> 5>all_files.obj : warning LNK4217: locally defined symbol
>> 5> ?system_category@system@boost@@YAABVerror_category@12@XZ (class
>> 5> boost::system::error_category const & __cdecl
>> 5> boost::system::system_category(void)) imported in function "void
>> 5> __cdecl boost::system::`dynamic initializer for
>> 5> native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ)
>> 5>moc_GraphicsItem.obj : warning LNK4049: locally defined symbol
>> ?system_category@system@boost@@YAABVerror_category@12@XZ (class
>> boost::system::error_category const & __cdecl
>> boost::system::system_category(void)) imported
>> 5>moc_GraphicsViewInput.obj : warning LNK4049: locally defined symbol
>> ?system_category@system@boost@@YAABVerror_category@12@XZ (class
>> boost::system::error_category const & __cdecl
>> boost::system::system_category(void)) imported
>> 5>boost_thread-vc100-mt-1_50.lib(thread.obj) : error LNK2019:
>> 5> unresolved external symbol "public: static class
>> 5> boost::chrono::time_point<class boost::chrono::system_clock,class
>> 5> boost::chrono::duration<__int64,class boost::ratio<1,10000000> > >
>> 5> __cdecl boost::chrono::system_clock::now(void)"
>> 5>
>> (?now@system_clock@chrono@boost@@SA?AV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0JIJGIA@@boost@@@23@@23@XZ)
>> 5> referenced in function "public: bool __thiscall
>> 5> boost::thread::try_join_until(class boost::chrono::time_point<class
>> 5> boost::chrono::system_clock,class
>> 5> boost::chrono::duration<__int64,class boost::ratio<1,1000000000> >
>> 5> > const &)"
>> 5>
>> (?try_join_until@thread@boost@@QAE_NABV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z)
>> 5>I:\Program Files\CGAL-4.0.2\bin\Release\CGAL_Qt4-vc100-mt-4.0.2.dll :
>> fatal error LNK1120: 1 unresolved externals
>> 6>------ Build started: Project: ALL_BUILD, Configuration: Release Win32
>> ------
>> 6> Build all projects
>> ========== Build: 3 succeeded, 3 failed, 0 up-to-date, 0 skipped
>> =========="
>>
>>
>> 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.
>
> CGAL 4.0.2 + Boost 1.49 should work as well. If you want to use Boost
> 1.50 tweak
>
> find_package( Boost 1.33.1 REQUIRED thread )
> to
> find_package( Boost 1.33.1 REQUIRED thread system )
>
> in /path/to/cgal/cmake/modules/CGAL_SetupBoost.cmake.
>
>>
>> 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.
>
> Boost 1.50 was released after CGAL 4.0.2, so this problem wasn't known
> when that version was released. The table in the Installation
> instructions should probably be updated to reflect this incompatibility
> or mention a maximum version that has been tested.
>
> HTH,
> Philipp Moeller
> GeometryFactory
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
- [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0, Wei Li, 08/29/2012
- Re: [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0, Philipp Moeller, 08/30/2012
- Re: [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0, Wei Li, 08/30/2012
- Re: [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0, Laurent Rineau (CGAL/GeometryFactory), 08/30/2012
- Re: [cgal-discuss] [Bug Report] Failed when compiling CGAL4.0.2 with Boost1.50.0 or 1.51.0, Philipp Moeller, 08/30/2012
Archive powered by MHonArc 2.6.18.