|
Boost Users : |
From: Eswar K (kja.eswar_at_[hidden])
Date: 2007-12-30 09:11:27
Hi,
I am a newbie to Boost. I am writing a sample code using the Boost libaries
and am getting the following error during linking.
*Command Line Usage *
*
**g++ -I /usr/include/boost/ example.cpp -o example.o*
*Code*
*#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/positional_options.hpp>
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options/parsers.hpp>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <map>
#include <string>
using namespace boost::program_options;
//namespace po = boost::program_options;
int main()
{
using namespace boost::lambda;
// using namespace boost::program_options;
typedef std::istream_iterator<int> in;
std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
option_description opts;
}
*
*Error Message*
/tmp/ccO0HWa7.o(.text+0xb0): In function `main':
example.cpp: undefined reference to
`boost::program_options::option_description::option_description()'
/tmp/ccO0HWa7.o(.text+0xbf):example.cpp: undefined reference to
`boost::program_options::option_description::~option_description()'
collect2: ld returned 1 exit status
$LD_LIBRARY_PATH has the following value set.
/home/suhas/boost/lib:/usr/lib:/usr/include/boost/
I am stuck, any help will be really appreciated.
Thanks in advance.
Regards,
Eswar
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net