Link Error Using gcc49 port on Mac OS 10.9

Ryan Schmidt ryandesign at macports.org
Thu Dec 5 23:59:47 PST 2013


On Dec 5, 2013, at 23:10, Geoffrey Odhner wrote:

> I just installed MacPorts, and gcc49, and tried to compile a simple program, which really should work, but I'm getting a link error.  I narrowed it down, and if I take out the use of any regex then it will link.  I can leave in the #include <regex> line, but if I have any line that actually does a regex_search or a regex_replace, then I get the following error output when I compile and link (with my compile line shown first):
> 
> g++-mp-4.9 -std=c++11 -ggdb test-program.cxx -o test-program
> Undefined symbols for architecture x86_64:
>  "__istype(int, unsigned long)", referenced from:
>      std::ctype<char>::is(unsigned long, char) const in test-program.o
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> 
> Can anyone help me?  I don't know what to do next.

I don’t know the answer but I Googled the error message and found this post; does that help?

http://stackoverflow.com/questions/19576609/undefined-symbol-istype-in-macports-gcc-c11


I’d also ask if you really need to use gcc. Could you use clang instead?



More information about the macports-users mailing list