I've been trying to make MacOS X compile the example snippets from boost_1_28_0/libs/regex/example/snippets/ and I keep getting these messy link errors. It looks like /usr/bin/c++ is having trouble linking to libboost_regex.a here's an example: localhost% c++ -o regex_grep_example_1 regex_grep_example_1.cpp -lboost_regex /usr/bin/ld: Undefined symbols: __._Q25boostt14reg_expression3ZcZQ25boostt12regex_traits1ZcZt9allocator1Zc ___Q25boostt14reg_expression3ZcZQ25boostt12regex_traits1ZcZt9allocator1ZcPCc UiRCB2 ___Q35boost9re_detailt18match_results_base2ZPCcZt9allocator1ZcRCB1 _allocator__CQ25boostt14reg_expression3ZcZQ25boostt12regex_traits1ZcZt9alloc ator1Zc _allocator__CQ35boost9re_detailt18match_results_base2ZPCcZt9allocator1Zc _cow__Q35boost9re_detailt18match_results_base2ZPCcZt9allocator1Zc _m_free__Q35boost9re_detailt18match_results_base2ZPCcZt9allocator1Zc _set_first__Q35boost9re_detailt18match_results_base2ZPCcZt9allocator1ZcPCc _set_first__Q35boost9re_detailt18match_results_base2ZPCcZt9allocator1ZcPCcUl _set_size__Q35boost9re_detailt18match_results_base2ZPCcZt9allocator1ZcUlPCcn 1 localhost% I haven't enough experience with boost to know how to fix this, or even what it means, exactly. If its informative, c++ -v returns: Apple Computer, Inc. version gcc-934.3, based on gcc version 2.95.2 19991024 (release)
I've been trying to make MacOS X compile the example snippets from boost_1_28_0/libs/regex/example/snippets/ and I keep getting these messy link errors. It looks like /usr/bin/c++ is having trouble linking to libboost_regex.a here's an example:
I don't know what the issue is here - although I have been able to build and test regex on sourceforge's Darwin server, so this is possible. One thing I seem to remember is that Darwin requires that ranlib is run against .a files before you can link to them, I don't know if this is the issue here. One thing you might want to try is to try and build the regex regression test program using the makefile supplied: # build the lib: cd /boost-root/libs/regex/build make -fgcc.mak # do we need this step?: ranlib gcc/*.a # build and run the test program: cd ../test/regress make -fgcc.mak John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
participants (2)
-
John Maddock
-
Mystical Catty Tananeka