Boost logo

Boost Users :

Subject: Re: [Boost-users] 'Undefined symbols' error when building Mira Groupware on Mac OS X
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-23 15:24:58


AMDG

Max Bossino wrote:
> I think that worked. Here's the output:
>
> -----
> <snip>
> Linking CXX shared library bin/libFiles-utility.dylib
> "/Applications/CMake 2.8-1.app/Contents/bin/cmake" -E cmake_link_script CMakeFiles/Files-utility.dir/link.txt --verbose=1
> /usr/bin/c++ -fno-operator-names -g -dynamiclib -headerpad_max_install_names -o bin/libFiles-utility.dylib -install_name /Users/Max/Documents/Projects/Mira/Branches/build/bin/libFiles-utility.dylib CMakeFiles/Files-utility.dir/src/utilities/files/files.cpp.o CMakeFiles/Files-utility.dir/src/utilities/files/FileUtility.cpp.o CMakeFiles/Files-utility.dir/src/utilities/files/FileServer.cpp.o CMakeFiles/Files-utility.dir/src/utilities/files/FileConnection.cpp.o bin/libmira.dylib
>

Okay, thanks.

CMakeLists.txt:

SET ( FILES_UTILITY_SOURCES
        "src/utilities/files/files.cpp"
        "src/utilities/files/FileUtility.cpp"
        "src/utilities/files/FileServer.cpp"
        "src/utilities/files/FileConnection.cpp")

add_library(Files-utility SHARED ${FILES_UTILITY_SOURCES})

TARGET_LINK_LIBRARIES ( Files-utility mira )

You need to link to boost_filesystem and boost_system. See
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:FindBoost
I think the variable is ${Boost_LIBRARIES}, although that may
get you more libraries than you need.

In Christ,
Steven Watanabe


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