Boost logo

Boost Users :

Subject: Re: [Boost-users] Using boost library on MacOSx
From: Grant Erickson (gerickson_at_[hidden])
Date: 2009-07-25 13:43:40


On 7/25/09 12:39 AM, n179911 wrote:
> On Sat, Jul 25, 2009 at 12:21 AM, Vladimir Prus<vladimir_at_[hidden]>
wrote:
>> n179911 wrote:
>>> On Fri, Jul 24, 2009 at 9:53 AM,
>>> justinleona_at_[hidden]<justinleona_at_[hidden]> wrote:
>>>> It sounds like you don't have the include path for boost as part of
>>>> your build environment.  By default I believe it should be installed
>>>> somewhere like '/opt/local/include/boost'.  If you are using a
>>>> compiled boost library, you may also need '/opt/local/lib'.  Can you
>>>> post more information on what build system you are using? (Xcode,
>>>> eclipse, make, etc).
>>>
>>> I have created a XCode project and I have add Header Search Path to
>>> /opt/local/include/boost
>>> Library Search Path to /opt/local/lib.
>>>
>>> But I still have this error:
>>>   "boost::system::get_generic_category()", referenced from:
>>>       __static_initialization_and_destruction_0(int, int)in main.o
>>>       __static_initialization_and_destruction_0(int, int)in main.o
>>>       __static_initialization_and_destruction_0(int, int)in main.o
>>>
>>> I found this thread
>>> http://www.nabble.com/installing-boost-on-Mac-OS-X-(version-10.5.5)-td200872
>>> 59.html
>>> but it did not solve my problem.
>> This is because you did not link to Boost.System library.
>>
>
> I have add /opt/local/lib to my LIBRARY SEARCH PATH in my xcode project info.
> And in my /opt/local/lib, I find this (I assume that is Boost.System library):
>
> -rw-r--r-- 2 root admin 80600 Jul 23 16:31 libboost_system-mt.a
> -rwxr-xr-x 2 root admin 30988 Jul 23 16:30 libboost_system-mt.dylib*

You need to add libboost_system-mt.dylib as an external link library for the
target you are linking. See

    Xcode Build System Guide: Linking to a Dynamic Library in a Nonstandard
Location

Regards,

Grant


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net