|
|
#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:
Quote:
Code:
......
#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.
|
||
|
|
0
|
|
|
#2 |
|
ld is the linker. The linker misses a binary in which those symbols have to be found.
__________________
Oh, and by the way, Micro$oft suxorz!!! |
|
|
|
0
|
|
|
#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).
__________________
-daveL |
|
|
|
0
|
|
|
#4 |
|
I use regex functions and it compiles now. Thanks a ton.
|
|
|
|
0
|
|
|
#5 | |
|
Quote:
__________________
-daveL |
||
|
|
0
|
|
|
#6 |
|
ld: Undefined symbols:
Hello!
I'm having a similar problem, and cannot find which library I have to link. Does anyone have an idea? The error is : Code:
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 ? |
|
|
|
0
|
|
|
#7 | |
|
Quote:
|
||
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| 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.






Linear Mode

