|Apr 23, 2005, 03:25 PM||#1|
gcc compilation error -- ld: Undefined symbols
I use a dictionary program on SunOS and planned to port it onto my Mac. I tried to compile it but got the error message:
...... #include <unistd.h> #ifdef __svr4__ #include <libgen.h> #else extern char *re_comp(char *); extern int re_exec(char *); #endif ......
Any suggestion? Thanks a ton.
|Apr 23, 2005, 03:47 PM||#3|
You need to link in libcompat, which doesn't seem to be included in OS X, or you have to change the code the code to use the newer 'regex' functions, which are in libc. You can get libcompat from the Darwin "ports" project (dport).
|Jul 19, 2005, 05:59 AM||#6|
ld: Undefined symbols:
I'm having a similar problem, and cannot find which library I have to link. Does anyone have an idea?
The error is :
ld: Undefined symbols: _CFDataGetBytes _CFRelease _CFShow ___CFStringMakeConstantString _kCFAllocatorDefault /usr/bin/libtool: internal link edit command failed
Oddly, when I compile with XCode, it works fine. XCode must include automatically the missing libraries, I think.
Does anyone know where those functions come from ?
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|GCC complaining about undefined symbols when trying to compile .o for using as JNI.||ColdStone||Mac Programming||1||Jul 24, 2011 12:33 PM|
|compiling error -f68881||higeorge||Mac Programming||2||Nov 16, 2010 01:31 PM|
|GCC complaining about undefined symbols when trying to compile for 10.5 in 10.6||foidulus||Mac Programming||2||May 4, 2010 01:07 PM|
|/usr/bin/ld: Undefined symbols:||kipepeo||Mac Programming||3||May 25, 2007 04:30 AM|
|ld: Undefined symbols:_main||rain||Mac Programming||1||Oct 23, 2004 06:59 PM|
All times are GMT -5. The time now is 02:13 AM.