On 20 Nov 2017, at 19:15, Lobron, David <[email protected]> wrote:
>
> One more bit of info on the linker error on my .mm test program: I confirmed
> that libobjc.so has the symbols, e.g.,
>
> (ALSI8)dlobron@bos-lps80:~/build/clangport/akamai/common/lib$ nm -C
> libobjc.so|grep objc_autorelease
> 00000000000204b0 T objc_autorelease
> 00000000000200f0 T objc_autoreleasePoolPop
> 000000000001fc90 T objc_autoreleasePoolPush
> 00000000000204f0 T objc_autoreleaseReturnValue
>
> I'm linking with the library:
>
> /home/dlobron/build/clangport/akamai/llvm/llvm-5.0.0.install/bin/clang
> -std=gnu99 -fexceptions -rdynamic
> CMakeFiles/CXXException.dir/CXXException.mm.o -o CXXException
> -Wl,-rpath,/home/dlobron/build/clangport/akamai/libobjc2/libobjc2-1.8.1/build
> ../libobjc.so.4.6 -lstdc++ ../libobjcxx.so.4.6
> -L/home/dlobron/build/clangport/akamai/common/lib -lobjcxx -lobjc
>
> But the symbol is still not found:
>
> CMakeFiles/CXXException.dir/CXXException.mm.o: In function
> `_i_Test__autorelease':
> /home/dlobron/build/clangport/akamai/libobjc2/libobjc2-1.8.1/Test/CXXException.mm:(.text+0x98):
> undefined reference to `objc_autorelease(objc_object*)’
This looks like it’s trying to all a version with C++ name mangling. Try
sticking an extern “C” { } around the #includes.
David
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep