id summary reporter owner description type status milestone component version severity resolution keywords cc 783 Can't compile anything with boost - undefined reference fafnr nobody "{{{ I doubt this is a bug - it's highly likely it's me being stupid. (Also, please bear in mind I've never really used c++ before... That probably means I'm not legally allowed to use Boost, but I'm kindda used to having filesystem operations, so I wanted to try it out... :-) Anyway! I downloaded boost from the website to my desktop, cd'ed to it, unpacked it and cd'ed inside. Then I ran: >sudo bjam ""-sTOOLS=gcc"" install and waited for it to complete... So, after I did that, I figured I was ready to use boost... I found a file-system example on http://www.boost.org/libs/filesystem/example/simple_ls.cpp and tried compiling it: > g++ simple_ls.cpp -o simple_ls But that gives me the following output: (WARNING! Pretty long copy-paste here...) soren@soren-laptop:~$ g++ simple_ls.cpp -o simple_ls /tmp/ccDCA1UI.o: In function `main': simple_ls.cpp:(.text+0x89): undefined reference to `boost::filesystem::initial_path()' simple_ls.cpp:(.text+0xb7): undefined reference to `boost::filesystem::native(std::basic_string, std::allocator > const&)' simple_ls.cpp:(.text+0xc6): undefined reference to `boost::filesystem::path::path(char const*, bool (*)(std::basic_string, std::allocator > const&))' simple_ls.cpp:(.text+0xd8): undefined reference to `boost::filesystem::system_complete(boost::filesystem::path const&)' simple_ls.cpp:(.text+0x17a): undefined reference to `boost::filesystem::exists(boost::filesystem::path const&)' simple_ls.cpp:(.text+0x193): undefined reference to `boost::filesystem::path::native_file_string() const' simple_ls.cpp:(.text+0x208): undefined reference to `boost::filesystem::is_directory(boost::filesystem::path const&)' simple_ls.cpp:(.text+0x222): undefined reference to `boost::filesystem::path::native_directory_string() const' simple_ls.cpp:(.text+0x2b5): undefined reference to `boost::filesystem::is_directory(boost::filesystem::path const&)' simple_ls.cpp:(.text+0x2d7): undefined reference to `boost::filesystem::path::leaf() const' simple_ls.cpp:(.text+0x34a): undefined reference to `boost::filesystem::path::leaf() const' simple_ls.cpp:(.text+0x3f1): undefined reference to `boost::filesystem::path::leaf() const' simple_ls.cpp:(.text+0x56a): undefined reference to `boost::filesystem::path::native_file_string() const' /tmp/ccDCA1UI.o: In function `boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&)': simple_ls.cpp:(.text._ZN5boost10filesystem18directory_iteratorC1ERKNS0_4pathE[boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&)]+0x2b): undefined reference to `boost::filesystem::detail::dir_itr_init(boost::shared_ptr&, boost::filesystem::path const&)' /tmp/ccDCA1UI.o: In function `boost::filesystem::directory_iterator::dereference() const': simple_ls.cpp:(.text._ZNK5boost10filesystem18directory_iterator11dereferenceEv[boost::filesystem::directory_iterator::dereference() const]+0xd): undefined reference to `boost::filesystem::detail::dir_itr_dereference(boost::shared_ptr const&)' /tmp/ccDCA1UI.o: In function `boost::filesystem::directory_iterator::increment()': simple_ls.cpp:(.text._ZN5boost10filesystem18directory_iterator9incrementEv[boost::filesystem::directory_iterator::increment()]+0xd): undefined reference to `boost::filesystem::detail::dir_itr_increment(boost::shared_ptr&)' collect2: ld returned 1 exit status this was run from the root of my home-dir... To me it looks like it doesn't get the boost-files included somehow (thought it MUST find them, otherwise the compiler would have complained about missing files)... Any thoughts? /Søren }}}" Support Requests deleted build None Not Applicable None