[regex] problem with linking to boost_regex
hi, this is the first time iam using boost::regex. when i compile the program, it lists a lot of 'undefined reference to' s to regex functions. tried setting linked flag -llibboost_regex-gcc43-mt and -L/usr/local/lib in eclipse but no use. please help. - Phani.
this is the first time iam using boost::regex. when i compile the program, it lists a lot of 'undefined reference to' s to regex functions. tried setting linked flag -llibboost_regex-gcc43-mt and -L/usr/local/lib in eclipse but no use.
We would need to see the actual command lines and the error messages to help, but one quick check is that the -llibboost_regex-gcc43-mt flag must come *after* the object files that use on the linker command line. HTH, John.
AMDG John Maddock wrote:
this is the first time iam using boost::regex. when i compile the program, it lists a lot of 'undefined reference to' s to regex functions. tried setting linked flag -llibboost_regex-gcc43-mt and -L/usr/local/lib in eclipse but no use.
We would need to see the actual command lines and the error messages to help, but one quick check is that the -llibboost_regex-gcc43-mt flag must come *after* the object files that use on the linker command line.
In addition , I believe that the correct option is -lboost_regex-gcc43-mt, since gcc will add the lib prefix automatically. In Christ, Steven Watanabe
participants (3)
-
John Maddock
-
Phani Deepak Parasuramuni
-
Steven Watanabe