A
Andreas S.
Hi,
I don't any solution any more... I have written a small tool wich uses
the boost library. It compiles fine, but I can't link it.
I am on a Fedora Core 6 x86_64 system. The boost library is installed
with "yum install boost" - so this should be fine.
ldconfig | grep boost gives me a list with all the installed boost
libraries, including the two (libboost_filesystem.so and
libboost_regex.so) I need.
The LDFLAG is set to "-lstdc++ -newlib -libboost_regex
-libboost_filesystem", which should include the boost libraries for the
linker, as far as I know.
but when i call g++ to link my two object files to the binary, it fails:
g++ -o hrmmerge HRMmerge.o fileinfo.o -L/usr/lib64
HRMmerge.o: In function `open_files(char*)':
HRMmerge.cpp.text+0x1f9): undefined reference to
`boost::filesystem:ath:ath(char const*)'
HRMmerge.cpp.text+0x202): undefined reference to
`boost::filesystem::exists(boost::filesystem:ath const&)'
HRMmerge.cpp.text+0x254): undefined reference to
`boost::filesystem:ath:ath(char const*)'
HRMmerge.cpp.text+0x29e): undefined reference to
`boost::filesystem:ath::leaf() const'
HRMmerge.cpp.text+0x2c2): undefined reference to
`boost::filesystem::is_directory(boost::filesystem:ath const&)'
HRMmerge.o: In function
`boost::filesystem::directory_iterator::directory_iterator(boost::filesystem:ath
const&)':
HRMmerge.cpp.text._ZN5boost10filesystem18directory_iteratorC1ERKNS0_4pathE[boost::filesystem::directory_iterator::directory_iterator(boost::filesystem:ath
const&)]+0x2c): undefined reference to
`boost::filesystem::detail::dir_itr_init(boost::shared_ptr<boost::filesystem::detail::dir_itr_imp>&,
boost::filesystem:ath const&)'
HRMmerge.o: In function `boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char
const*, char const*, unsigned int)':
HRMmerge.cpp.text._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char
const*, char const*, unsigned int)]+0x27): undefined reference to
`boost::basic_regex<char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*,
unsigned int)'
and so on...
Anybody an idea what to do? My c++ experience is not really fresh
anymore and I am not too familiar with g++ and building software on
linux. So I am stuck :-(
Thanks in advance!
Andreas
I don't any solution any more... I have written a small tool wich uses
the boost library. It compiles fine, but I can't link it.
I am on a Fedora Core 6 x86_64 system. The boost library is installed
with "yum install boost" - so this should be fine.
ldconfig | grep boost gives me a list with all the installed boost
libraries, including the two (libboost_filesystem.so and
libboost_regex.so) I need.
The LDFLAG is set to "-lstdc++ -newlib -libboost_regex
-libboost_filesystem", which should include the boost libraries for the
linker, as far as I know.
but when i call g++ to link my two object files to the binary, it fails:
g++ -o hrmmerge HRMmerge.o fileinfo.o -L/usr/lib64
HRMmerge.o: In function `open_files(char*)':
HRMmerge.cpp.text+0x1f9): undefined reference to
`boost::filesystem:ath:ath(char const*)'
HRMmerge.cpp.text+0x202): undefined reference to
`boost::filesystem::exists(boost::filesystem:ath const&)'
HRMmerge.cpp.text+0x254): undefined reference to
`boost::filesystem:ath:ath(char const*)'
HRMmerge.cpp.text+0x29e): undefined reference to
`boost::filesystem:ath::leaf() const'
HRMmerge.cpp.text+0x2c2): undefined reference to
`boost::filesystem::is_directory(boost::filesystem:ath const&)'
HRMmerge.o: In function
`boost::filesystem::directory_iterator::directory_iterator(boost::filesystem:ath
const&)':
HRMmerge.cpp.text._ZN5boost10filesystem18directory_iteratorC1ERKNS0_4pathE[boost::filesystem::directory_iterator::directory_iterator(boost::filesystem:ath
const&)]+0x2c): undefined reference to
`boost::filesystem::detail::dir_itr_init(boost::shared_ptr<boost::filesystem::detail::dir_itr_imp>&,
boost::filesystem:ath const&)'
HRMmerge.o: In function `boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char
const*, char const*, unsigned int)':
HRMmerge.cpp.text._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char
const*, char const*, unsigned int)]+0x27): undefined reference to
`boost::basic_regex<char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*,
unsigned int)'
and so on...
Anybody an idea what to do? My c++ experience is not really fresh
anymore and I am not too familiar with g++ and building software on
linux. So I am stuck :-(
Thanks in advance!
Andreas