Boost logo

Boost :

From: mahesh karanth (tumkurkaranth_at_[hidden])
Date: 2006-02-21 02:16:56


  Hello All,
   I have some link problems when I try to compile example give in regex (grep example).
 I have given the command as below.
 
 g++ grep.cpp -I/home/mahesh/boost/boost_1_33_1 -L/home/mahesh/boost/boost_1_33_1/libs/regex/build/gcc -lboost_regex
 
 I got so many 'Undefined references' error..
 
 Below is the snipshot of error what I got on the console...
 /tmp/ccp2j6yI.o(.text+0x42b): In function `main':
 grep.cpp: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
 /tmp/ccp2j6yI.o(.text+0x4df):grep.cpp: undefined reference to `boost::program_options::options_description::add_options()'
 /tmp/ccp2j6yI.o(.text+0x507):grep.cpp: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
 /tmp/ccp2j6yI.o(.text+0x51d):grep.cpp: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
 /tmp/ccp2j6yI.o(.text+0x533):grep.cpp: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
 /tmp/ccp2j6yI.o(.text+0x549):grep.cpp: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
 /tmp/ccp2j6yI.o(.text+0x55f):grep.cpp: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
 /tmp/ccp2j6yI.o(.text+0x575):grep.cpp: more undefined references to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)' follow
 ..
 .
 .
 .
 .
 .
 .
 
 .
 .
 ..grep.cpp: undefined reference to `boost::program_options::invalid_option_value::invalid_option_value(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
 collect2: ld returned 1 exit status
 
 Can any one tell me what is the problem?
 Or am I using wrong command to compile the example?
 
 Best Regards
   Mahesh Karanth
 
 
 
    

---------------------------------

 

                
---------------------------------
 Yahoo! Mail
 Use Photomail to share photos without annoying attachments.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk