[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Symbols not found?
From: |
Kevin Ingwersen |
Subject: |
Re: Symbols not found? |
Date: |
Thu, 12 Dec 2013 20:51:51 +0100 |
I couldnt sit still, and instead searched further. I ended up with the fact
that I forgot to link the foundation framework, and managed to link in the
libobjc I created. Now however, I have the problem that I am linked to 2
libobjc’s - the one from apple and the one from GNUstep. So how do I prevent
GCC from auto-linking against Apple’s runtime?
Some output:
Ingwie@Ingwies-Air ~/Work/objc $ /opt/GNUstep/bin/g++ -fnext-runtime test3.mm
-framework Foundation
Ingwie@Ingwies-Air ~/Work/objc $ ./a.out
objc[92056]: Class Object is implemented in both /usr/lib/libobjc.A.dylib and
/opt/GNUstep/lib/libobjc.1.dylib. One of the two will be used. Which one is
undefined.
objc[92056]: Class Protocol is implemented in both /usr/lib/libobjc.A.dylib and
/opt/GNUstep/lib/libobjc.1.dylib. One of the two will be used. Which one is
undefined.
Welcome to this ObjC++
ObjC call
C++ call
Ingwie@Ingwies-Air ~/Work/objc $ otool -L a.out
a.out:
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
(compatibility version 300.0.0, current version 1056.0.0)
libobjc.1.dylib (compatibility version 0.0.0, current version 1.7.2)
/opt/GNUstep/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.18.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1197.1.1)
/opt/GNUstep/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version
228.0.0)
Kind regards, Ingwie
Am 12.12.2013 um 19:15 schrieb Kevin Ingwersen <ingwie2000@googlemail.com>:
> Hey.
>
> The GCC i compiled is 4.8.2, with ObjC support - and with that I compiled the
> libobjc for gnustep form github. But that didn’t affect the GCC part afaik.
> What does the switch "-fobjc-runtime=gnustep-1.7“ mean - and from where does
> GCC know about gnustep-1.7?
> Im just curios, as I am no compiler junky ^^;
>
> Kind regards,
> Ingwie
> Am 12.12.2013 um 14:52 schrieb David Chisnall <David.Chisnall@cl.cam.ac.uk>:
>
>> Correct, this function is not defined by the GNUstep or GCC Objective-C ABI.
>> Try adding -fobjc-runtime=gnustep-1.7 to your OBJCFLAGS - on OS X the
>> default is to use the macosx runtime ABI.
>>
>> David
>>
>> On 12 Dec 2013, at 03:27, Kevin Ingwersen <ingwie2000@googlemail.com> wrote:
>>
>>> Hey!
>>>
>>> After experimenting and researching the case of GNUstep on Mac, I have just
>>> come along soemthing strange: _objc_msgSend_fixup is not defined in the
>>> libobjc AND libobjc-gnu that I get while creating the gnustep libobjc and
>>> the GCC with objc support.
>>>
>>> I used the gnustep-libobjc from github, because that one worked for
>>> compiling.
>>>
>>> Kind regards, Ingwie
>>> _______________________________________________
>>> Discuss-gnustep mailing list
>>> Discuss-gnustep@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnustep
>>
>