Undefined symbols "boost::system::get_posix_category()" and "boost::system::get_system_category()"
Hello,
I'm trying to use the filesystem libraries provided by Boost (1.35)
through "boost/filesystem.hpp". I've installed Boost via macports and
checked whether or not the installation is up to date, which it is.
Moreover, I can use (some) other Boost libraries just fine, but not the
abovementioned one.
I'm using the following code to access several libraries:
----SNIP----
#include
Frank van Meurs wrote: [...]
Including any of the first three libraries works just fine and results in a successful build. However, adding the fourth results in:
----SNIP---- Undefined symbols: "boost::system::get_posix_category()", referenced from: __static_initialization_and_destruction_0(int, int)in test.o __static_initialization_and_destruction_0(int, int)in test.o "boost::system::get_system_category()", referenced from: __static_initialization_and_destruction_0(int, int)in test.o __static_initialization_and_destruction_0(int, int)in test.o ---/SNIP--- Can anybody point me to a solution for this issue? I really prefer using the existing functionality from Boost over wirting them myself...
Some Boost library consists of both headers and source files. These source files are usually compiled into a library, which you need to link with. From the error message I would think that you need to link to Boost.System and Boost.Filesystem. Those libraries should have been provided upon installation of Boost. If not, you'll need to figure out how to build them for yourself, or just include the corresponding sources into your project. HTH, Markus
You need to link with both boost_system and boost_filesystem. F. Bron boost-users-bounces@lists.boost.org a écrit sur 17/07/2008 12:28:02 :
Hello,
I'm trying to use the filesystem libraries provided by Boost (1.35) through "boost/filesystem.hpp". I've installed Boost via macports and checked whether or not the installation is up to date, which it is. Moreover, I can use (some) other Boost libraries just fine, but not the abovementioned one.
I'm using the following code to access several libraries:
----SNIP---- #include
#include #include #include ---/SNIP---- Including any of the first three libraries works just fine and results in a successful build. However, adding the fourth results in:
----SNIP---- Undefined symbols: "boost::system::get_posix_category()", referenced from: __static_initialization_and_destruction_0(int, int)in test.o __static_initialization_and_destruction_0(int, int)in test.o "boost::system::get_system_category()", referenced from: __static_initialization_and_destruction_0(int, int)in test.o __static_initialization_and_destruction_0(int, int)in test.o ---/SNIP--- Can anybody point me to a solution for this issue? I really prefer using the existing functionality from Boost over wirting them myself...
Thanks in advance. Kind regards, Frank
-------------------- Frank van Meurs Dept. of Information and Computer Sciences, Utrecht University Padualaan 14, 3584 CH Utrecht, The Netherlands P: +31 (0)30 - 253 9128 F: +31 (0)30 - 253 4619 W: http://www.cs.uu.nl/staff/fvm.html
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
participants (3)
-
Frank van Meurs
-
frederic.bron@alcan.com
-
Markus Schöpflin