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
#include <iostream>
#include <iterator>
#include <algorithm>
#include
#include
#include
#include
#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