
Eric Lin
I copied a piece simple Using Regular Expressions
Programs using Boost.Regex must be linked against the relevant library. That is, Boost.Regex is *not* header-only. On my system (Linux, Fedora 15 x86-64), I get link errors if I don't specify the correct library: $ g++ -o regex-iterator regex-iterator.cpp [pages and pages of "undefined reference" errors] But when I do specify the appropriate library, it works fine: $ g++ -o regex-iterator regex-iterator.cpp -lboost_regex $ ./regex-iterator who lives in a pineapple under the sea? In general, any time you see an "undefined reference", that's a hint that you don't have all the necessary libraries on your link line. (Or that you're trying to use an entity that has a valid signature but is lacking an implementation; e.g., a template declaration that does not have a matching definition / instantiation.) Hope this helps! Regards, Tony