|
Boost : |
From: SourceForge.net (noreply_at_[hidden])
Date: 2006-11-28 17:36:20
Support Requests item #1604869, was opened at 2006-11-28 23:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=207586&aid=1604869&group_id=7586
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Søren G. Andersen (fafnr)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't compile anything with boost - undefined reference
Initial Comment:
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_at_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<char, std::char_traits<char>, std::allocator<char> > const&)'
simple_ls.cpp:(.text+0xc6): undefined reference to `boost::filesystem::path::path(char const*, bool (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > 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::detail::dir_itr_imp>&, 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<boost::filesystem::detail::dir_itr_imp> 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<boost::filesystem::detail::dir_itr_imp>&)'
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=207586&aid=1604869&group_id=7586
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk