discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Category Unknown ?


From: Andreas Buff
Subject: Re: Category Unknown ?
Date: Tue, 7 Dec 2021 16:18:00 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2

Hi,

just for the record, in case others stumble over the same issue:

We were able to force link categories.

We stopped using GNUstep makefiles, writing our own simple makefiles to  
disable all GNUstep magic understand what is going on.

The actual fix then was to explicitly pass `--whole-archive` to the  
linker to force link/load all .o files.

@andreas: thank you for your help. Appreciated.

Best,
Andreas


> Am 07.10.21 um 10:30 schrieb Andreas Buff:
>> Hi!
>>
>> I am new to GNUstep.
>>
>> I am building an executable on Linux. Using include
>> `$(GNUSTEP_MAKEFILES)/tool.make`.
>>
>> It's linked to a static lib that has also be build with GNUstep. The lib
>> contains Categories.
>>
>> The executable builds fine but has errors at runtime not recognizing
>> methods defined in the static lib's Category:
>>
>> "Uncaught exception NSInvalidArgumentException, reason:
>> ClassNameOfClassTheCategoryExtends(instance) does not recognize
>> nameOfMethodInCategory"
>>
>> I am trying to fix that by passing `-ObjC` to the linker flags (also
>> tried `-all_load`) in the executable's GNUmakefile:
>>
>> `ADDITIONAL_LDFLAGS =  -ObjC -all_load`
>>
>> But that seems to be ignored by clang. Here is the relevant output of
>> `make install messages=yes debug=yes`
>>
>> ```
>> clang: warning: argument unused during compilation: '-ObjC'
>> [-Wunused-command-line-argument]
>> clang: warning: argument unused during compilation: '-all_load'
>> [-Wunused-command-line-argument]
>> ```
>>
>> Any help or hint is appreciated.
>>
>> 🖖
>> Andreas
>>
>

Attachment: sender_key.asc
Description: application/pgp-keys


reply via email to

[Prev in Thread] Current Thread [Next in Thread]