Boost logo

Boost Users :

From: yg-boost-users_at_[hidden]
Date: 2003-06-05 13:01:20


I am also trying unsuccessfully to use the boost filesystem library.
I am getting an undefined symbol error when attempting to link the
example simple_ls.c program. I am also puzzled by the lack of .so
libraries, but I can use only .a's if necessary.

Could someone post a command line that will compile and link
simple_ls.c on any linux with any gcc ? I think I could work my way
forward from that, if I had it.

I copied the
libs/filesystem/build/bin/libboost_filesystem.a/gcc/debug/runtime-link-dynamic/libboost_filesystem.a
file to /usr/lib. I also have the boost header files copied to
/usr/include/boost.

I have been trying variations on this command line and been getting
pretty much the same error:

[code] rgristroph-austin| g++ -lboost_filesystem -o simple_ls simple_ls.cpp
/tmp/rgr/cckWE2oM.o: In function `main':
/tmp/rgr/cckWE2oM.o(.text+0x19): undefined reference to `boost::filesystem::initial_path()'
/tmp/rgr/cckWE2oM.o(.text+0x4c): undefined reference to `boost::filesystem::path::path[in-charge](char const*, boost::filesystem::path_format)'
/tmp/rgr/cckWE2oM.o(.text+0x5c): undefined reference to `boost::filesystem::system_complete(boost::filesystem::path const&)'
/tmp/rgr/cckWE2oM.o(.text+0x111): undefined reference to `boost::filesystem::exists(boost::filesystem::path const&)'
/tmp/rgr/cckWE2oM.o(.text+0x134): undefined reference to `boost::filesystem::path::native_file_string() const'
/tmp/rgr/cckWE2oM.o(.text+0x1b7): undefined reference to `boost::filesystem::is_directory(boost::filesystem::path const&)'
/tmp/rgr/cckWE2oM.o(.text+0x1da): undefined reference to `boost::filesystem::path::native_directory_string() const'
/tmp/rgr/cckWE2oM.o(.text+0x242): undefined reference to `boost::filesystem::directory_iterator::directory_iterator[in-charge]()'
/tmp/rgr/cckWE2oM.o(.text+0x255): undefined reference to `boost::filesystem::directory_iterator::directory_iterator[in-charge](boost::filesystem::path const&)'
/tmp/rgr/cckWE2oM.o(.text+0x289): undefined reference to `boost::filesystem::is_directory(boost::filesystem::path const&)'
/tmp/rgr/cckWE2oM.o(.text+0x2bd): undefined reference to `boost::filesystem::path::leaf() const'
/tmp/rgr/cckWE2oM.o(.text+0x33f): undefined reference to `boost::filesystem::path::leaf() const'
/tmp/rgr/cckWE2oM.o(.text+0x401): undefined reference to `boost::filesystem::path::leaf() const'
/tmp/rgr/cckWE2oM.o(.text+0x56f): undefined reference to `boost::filesystem::path::native_file_string() const'
/tmp/rgr/cckWE2oM.o: In function `boost::filesystem::directory_iterator::operator*() const':
/tmp/rgr/cckWE2oM.o(.gnu.linkonce.t._ZNK5boost10filesystem18directory_iteratordeEv+0xd): undefined reference to `boost::filesystem::directory_iterator::m_deref() const'
/tmp/rgr/cckWE2oM.o: In function `boost::filesystem::directory_iterator::operator->() const':
/tmp/rgr/cckWE2oM.o(.gnu.linkonce.t._ZNK5boost10filesystem18directory_iteratorptEv+0xd): undefined reference to `boost::filesystem::directory_iterator::m_deref() const'
/tmp/rgr/cckWE2oM.o: In function `boost::filesystem::directory_iterator::operator++()':
/tmp/rgr/cckWE2oM.o(.gnu.linkonce.t._ZN5boost10filesystem18directory_iteratorppEv+0xd): undefined reference to `boost::filesystem::directory_iterator::m_inc()'
collect2: ld returned 1 exit status
[code] rgristroph-austin|

Many thanks for any help,

--Rob


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