Linking Boost Filesystem in XCode 3.2 (MacPorts)
-
08-12-2019 - |
Question
I am using XCode 3.2 and have installed boost using the MacPorts project (both release and debug) however I am at a loss to get my application to link with boost::filesystem
I have set my library search path to /opt/local/lib but I still get unresolved references when linking the project.
I noticed in another post to add -lboost_system to the "other linker flags" but when I do this I get - libboost_system.dylib, file was built for unsupported file format which is not the architecture being linked (i386).
Is MacPorts not installing the right libraries or am I missing something else?
Martin
OTHER TIPS
It is possible that the name of the library is not exactly boost_system
but maybe boost_system-mt
(the -mt
is because boost was compiled with thread safety) or even some other suffix.
To be sure, you can look up the name in /opt/local/lib
:
find /opt/local/lib -name "libboost_system*"