If only...
Code: Select all
gcc -arch i386 -I. -o test.o -c test.c
gcc -arch i386 -o test test.o libPM3CsafeCP.a
Undefined symbols for architecture i386:
"_tkcmdsetCSAFE_get_dll_version", referenced from:
_main in test.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
I think it has something to do with the table of contents, but frankly, I'm out of my depth. It looks to me like the referenced symbol *is* in the library:
Code: Select all
$ otool -Sv libPM3CSafeCP.a | grep tkcmdsetCSAFE_get_dll_version
PM3CsafeCP.o __Z29tkcmdsetCSAFE_get_dll_versionv
PM3CsafeCP.o __Z29tkcmdsetCSAFE_get_dll_versionv.eh
PM3CsafeCP.o __Z29tkcmdsetCSAFE_get_dll_versionv
PM3CsafeCP.o __Z29tkcmdsetCSAFE_get_dll_versionv.eh
...but I don't know enough about the Mach-O library format to say for sure. A further complication is that I don't know if the other libraries I'm linking against, which are all i386/x86_64 universal, will be cool with linking against a library that's ppc/i386.
Any advice would be appreciated.