
Hi all, I just downloaded boost and I am attempting to create a trivial program. This my first attempt to develop boost on Fedora. Here is what I did: 1) downloaded boost_1_45_0 2) ./bootstrap.sh 3) ./bjam toolset=gcc variant=debug link=static --address-model=64 --with-regex All of these step ran uneventfully I then created a "hello world" regex program: // regex-test.cpp #include <string> #include <iostream> #include <boost/regex.hpp> int main( int argc, char * argv[] ) { // boost::regex pattern ("b.lug",boost::regex_constants::icase|boost::regex_constants::perl); std::string stringa ("Searching for bolug"); std::string replace ("BgLug"); std::string newString; // newString = boost::regex_replace (stringa, pattern, replace); printf("The new string is: |%s|\n",newString.c_str()); return 0; } To compile and link: g++ -o regex-test -I../../boost/boost_1_45_0/ -L../../boost/boost_1_45_0/stage/lib/ -lboost_regex regex-test.cpp If all of the boost::whatever code is commented-out then it compiles and links fine. [root@fc5-virt64 upstream]# g++ -o regex-test -I../../boost/boost_1_45_0/ -L../../boost/boost_1_45_0/stage/lib/ -lboost_regex regex-test.cpp [root@fc5-virt64 upstream]# ./regex-test The new string is: || [root@fc5-virt64 upstream]# However, if I, say, uncomment-out the first line of code I get: [root@fc5-virt64 upstream]# g++ -o regex-test -I../../boost/boost_1_45_0/ -L../../boost/boost_1_45_0/stage/lib/ -lboost_regex regex-test.cpp /tmp/ccDG8tmV.o: In function `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)': regex-test.cpp:(.text._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)]+0x27): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)' collect2: ld returned 1 exit status [root@fc5-virt64 upstream]# Does anyone have any suggestions? johnh