boost.program_options or boost bjam build issue
I had rebuilt my library using bjam because I needed a 32 bit Linux build(while on a 64 bit machine).
I built the libraries and linked them into my project. I was attempting to use my local boost files, but I get an error referring to another boost include directory which is a different version. I don't specify the path being referred to in my link steps anywhere, so I'm assuming my build with bjam didn't specify a necessary define.
The error I see is: main.o(.gnu.linkonce.t._ZN5boost15program_options25basic_command_line_parserIcEC1EiPPc+0x53): In function `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char**)':
/usr/include/boost/program_options/detail/parsers.hpp:42: undefined reference to `boost::program_options::common_command_line_parser::common_command_line_parser(std::vector
Dan Pieczynski wrote:
I had rebuilt my library using bjam because I needed a 32 bit Linux build(while on a 64 bit machine).
I built the libraries and linked them into my project. I was attempting to use my local boost files, but I get an error referring to another boost include directory which is a different version. I don't specify the path being referred to in my link steps anywhere, so I'm assuming my build with bjam didn't specify a necessary define.
The error I see is: main.o(.gnu.linkonce.t._ZN5boost15program_options25basic_command_line_parserIcEC1EiPPc+0x53): In function `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char**)': /usr/include/boost/program_options/detail/parsers.hpp:42: undefined reference to
`boost::program_options::common_command_line_parser::common_command_line_parser(std::vector std::char_traits<char>, std::allocator<char> >, std::allocator This definitely means that when you build your main.o file, you use Boost includes in
/usr/include/boost/, not any local version you might have. This does not seem to be a problem
with the way boost is built.
- Volodya
This definitely means that when you build your main.o file, you use Boost > includes in /usr/include/boost/, not any local version you might have. This does not > > seem to be a problem with the way boost is built.
When I originally compiled that directory I confirmed the include directory had been pointing to the correct BOOST include directory(as opposed to the one reported in the link error). But the issue has been resolved. I found that I hadn't defined BOOST_ROOT when I originally built the library so I defined BOOST_ROOT and ran ./configure passing in the --includedir param. Then I rebuilt the project and it linked without incident. _______________________________________________________ The information in this email or in any file attached hereto is intended only for the personal and confiden- tial use of the individual or entity to which it is addressed and may contain information that is propri- etary and confidential. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communica- tion is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product. Email trans- mission cannot be guaranteed to be secure or error- free. P6070214
participants (2)
-
Dan Pieczynski
-
Vladimir Prus