> Am 05.12.2018 um 10:38 schrieb Riccardo Mottola <riccardo.mott...@libero.it>:
> 
> Hi Wolfgang,
> 
> Wolfgang Lux wrote:
>> I haven't been using OpenBSD for years, so I'm not sure why there is an 
>> /usr/include/objc header directory that does not match the compiler. But 
>> anyway, this is a problem that you'll see on every system where you use a 
>> gcc version which does not match the default compiler. Gcc knowns about the 
>> special directory containing the Objective-C headers and includes that in 
>> the default search path. However, that applies only to Objective-C files and 
>> not to plain C files like runtime.c. I think the best way to move forward 
>> would be renaming runtime.c into runtime.m so that this file gets compiled 
>> with the correct search path.
> 
> it could be a trick... I think here it is a little more awkward, however: the 
> "pkg" gcc is in its own directory:
> 
> /usr/local/lib/gcc/i386-unknown-openbsd6.4/4.9.4/include/objc/objc.h
> 
> The system gcc, is system-wide in the search path:
> /usr/include/objc/objc.h
> 
> Now, I suppose the GCC trick is that including "objc.h" works correctly.
> 
> However, if you include objc-api.h, which does not exist anylonger in more 
> recent versions of gcc, it will include the "Old" one because it is the only 
> one and it is in a valid search path, do you get my reasoning?

To be honest, no. The runtime.c file unconditionally includes objc-api.h, so 
it's obviously not supposed to compiled with a compiler that lacks the 
objc-api.h header file. So it doesn't really matter if the compiler would find 
the header from a different compiler version because the file shouldn't be 
compiled in the first place. :-)

Wolfgang



_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to