Boost logo

Boost-Build :

From: Petrus B. van Bork (pvanbork_at_[hidden])
Date: 2007-11-16 21:27:14


Dear All (...and the super-Volodya!):

Did check the path on g++ and had various path issues. Fixed same.
Finally, have compiled library - again, thank you, Volodya, for your input!

Now, being a complete Boost newbie, I am trying to compile "simple_ls"
test program. My compiler kicks on these two lines of code:

int main( int argc, char* argv[] ){

...and a few lines later...

full_path = fs::system_complete( fs::path( argv[1], fs::native ) );

My console output is:

**** Build of configuration Debug for project BoostTest ****

make all
Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -I"E:\BoostCPlusLibraries\boost_1_34_1" -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
Finished building: ../main.cpp
 
Building target: BoostTest.exe
Invoking: MinGW C++ Linker
g++ -o"BoostTest.exe" ./main.o
./main.o: In function `main':
E:/workspaceCPP/BoostTest/Debug/../main.cpp:25: undefined reference to
`boost::filesystem::native(std::string const&)'
./main.o: In function
`ZN5boost6detail17sp_counted_impl_pINS_10filesystem22basic_filesystem_errorINS2_10basic_pathISsNS2_11path_traitsEEEE5m_impEE7disposeEv':
E:/workspaceCPP/BoostTest/Debug/../main.cpp:(.text$_ZN5boost10filesystem12is_directoryERKNS0_10basic_pathISsNS0_11path_traitsEEE[boost::filesystem::is_directory(boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> const&)]+0x72): undefined reference to
`boost::filesystem::detail::status_api(std::string const&, unsigned int&)'
E:/workspaceCPP/BoostTest/Debug/../main.cpp:(.text$_ZN5boost10filesystem6existsERKNS0_10basic_pathISsNS0_11path_traitsEEE[boost::filesystem::exists(boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> const&)]+0x72): undefined reference to
`boost::filesystem::detail::status_api(std::string const&, unsigned int&)'
E:/workspaceCPP/BoostTest/Debug/../main.cpp:(.text$_ZN5boost10filesystem15system_completeERKNS0_10basic_pathISsNS0_11path_traitsEEE[boost::filesystem::system_complete(boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> const&)]+0xc0): undefined reference to
`boost::filesystem::detail::get_full_path_name_api(std::string const&,
std::string&)'
E:/workspaceCPP/BoostTest/Debug/../main.cpp:(.text$_ZN5boost10filesystem12current_pathINS0_10basic_pathISsNS0_11path_traitsEEEEET_v[boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits>
boost::filesystem::current_path<boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> >()]+0x6a): undefined reference to
`boost::filesystem::detail::get_current_path_api(std::string&)'
E:/workspaceCPP/BoostTest/Debug/../main.cpp:(.text$_ZN5boost10filesystem6statusERKNS0_10basic_pathISsNS0_11path_traitsEEE[boost::filesystem::status(boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> const&)]+0x72): undefined reference to
`boost::filesystem::detail::status_api(std::string const&, unsigned int&)'
E:/workspaceCPP/BoostTest/Debug/../main.cpp:(.text$_ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits>
>::m_init(boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> const&)]+0x63): undefined reference to
`boost::filesystem::detail::not_found_error'
./main.o: In function `main':
E:/workspaceCPP/BoostTest/Debug/../main.cpp:18: undefined reference to
`boost::filesystem::detail::dir_itr_first(void*&, std::string const&,
std::string&, boost::filesystem::file_status&,
boost::filesystem::file_status&)'
E:/workspaceCPP/BoostTest/Debug/../main.cpp:18: undefined reference to
`boost::filesystem::detail::dir_itr_increment(void*&, std::string&,
boost::filesystem::file_status&, boost::filesystem::file_status&)'
./main.o: In function
`ZN5boost6detail17sp_counted_impl_pINS_10filesystem22basic_filesystem_errorINS2_10basic_pathISsNS2_11path_traitsEEEE5m_impEE7disposeEv':
E:/workspaceCPP/BoostTest/Debug/../main.cpp:(.text$_ZN5boost10filesystem6detail11dir_itr_impINS0_10basic_pathISsNS0_11path_traitsEEEED1Ev[boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> >::~dir_itr_imp()]+0x46): undefined
reference to `boost::filesystem::detail::dir_itr_close(void*&)'
collect2: ld returned 1 exit status
make: *** [BoostTest.exe] Error 1

Well, there it is. I am not quite sure what to do - it is the demo code
and I double checked that it had been cut-and-pasted into my IDE
(Eclipse with CDT 4) correctly. Alas, I don't find the console output
adequately enlightening, based on my own knowledge. Does anyone know
what has gone wrong, after all this is demo code from Boost, and ought
to work, one would think?

Best,

Petrus


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk