gnustep-dev
[Top][All Lists]
Advanced

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

Re: libobjc2 on windows


From: Vincent Richomme
Subject: Re: libobjc2 on windows
Date: Sat, 06 Mar 2010 14:57:46 +0100
User-agent: RoundCube Webmail/0.2

On Sat, 06 Mar 2010 14:43:08 +0100, Vincent Richomme
<address@hidden> wrote:
> On Sat, 06 Mar 2010 14:29:14 +0100, Vincent Richomme
> <address@hidden> wrote:
>> Hi,
>> 
>> So I have installed last versions of GNUstep installers on windows and
>> compiled clang.
>> I have also checkouted libobjc2 and I entered:
>> 
>> CC=clang make
>> 
>> Making all in toydispatch...
>> Making all for library toydispatch...
>>  Compiling file toydispatch.c ...
>>  Linking library toydispatch ...
>> Creating library file: ./obj/libtoydispatch.dll.a
>> Making all for library libobjc...
>>  Compiling file class.c ...
>> cc1.exe: warnings being treated as errors
>> class.c:125: error: '_objc_lookup_class' redeclared without dllimport
>> attribute:
>>  previous dllimport ignored
>> make[2]: *** [obj/class.c.o] Error 1
>> make[1]: *** [internal-library-all_] Error 2
>> make: *** [libobjc.all.library.variables] Error 2
>> 
>> 
>> $ grep -Ri "objc_lookup_class" * (By the way grep inside your installer

>> grep is buggy because it's only a few kB while standard 
>> one is at least 1MB, so I have replaced
>> grep.exe, fgrep.exe and egrep.exe by last version from mingw 
>> see grep-2.5.4-1-msys-1.0.11-bin.tar.lzma).
>> 
>> ...
>> objc/objc-api.h:** This is a hook which is called by objc_lookup_class
> and
>> objc/objc-api.h:objc_EXPORT Class (*_objc_lookup_class)(const char
> *name);
>> objc/objc-api.h:Class objc_lookup_class(const char *name)
> OBJC_DEPRECATED;
>> 
>> I tried to add the same export declaration but stil got errors.
>> 
>> Any idea ?
>> 
> 
> Weird I have added __declspec(dllimport) and if I remove
> initialization(=0), compilation
> goes a bit further:
> 
> magic_objects.h:3: error: 'CONSTANT_STRING_CLASS' defined but not used
> make[2]: *** [obj/class.c.o] Error 1
> make[1]: *** [internal-library-all_] Error 2
> make: *** [libobjc.all.library.variables] Error 2
> 
> It seems like clang doesn't take into consideration the __declspec
> attribute
> when there is an initializer.

Actually I think clang is not called but gcc :

$> CC=clang.exe make messages=yes

Making all for library libobjc...
make -f GNUmakefile --no-print-directory --no-keep-going \
        internal-library-compile \
        GNUSTEP_TYPE=library \
        GNUSTEP_INSTANCE=libobjc \
        GNUSTEP_OPERATION=compile \
        GNUSTEP_BUILD_DIR="." \
        _GNUSTEP_MAKE_PARALLEL=yes
gcc class.c -c \
              -MMD -MP -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_SOURCE=500
-DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1
-DGNUSTEP_BASE_LIBRARY=1 -DGNUSTEP_WITH_DLL -DBUILD_libobjc_DLL=1 -g -Wall
-DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -Wno-import -g
-Werror -std=c99 -g -march=native -fexceptions -fgnu89-inline -I.
-I/home/Vincent/GNUstep/Library/Headers -I/GNUstep/Local/Library/Headers
-I/GNUstep/System/Library/Headers \
               -o obj/class.c.o
class.c:125: error: variable '_objc_lookup_class' definition is marked
dllimport
cc1.exe: warnings being treated as errors
class.c:125: error: '_objc_lookup_class' redeclared without dllimport
attribute: previous dllimport ignored
make[2]: *** [obj/class.c.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [libobjc.all.library.variables] Error 2


So how can I tell GNUmakefile to use clang ? I also tried the following
line:

$> CC=clang CXX=clang++ OBJC=clang make messages=yes but same problem.








reply via email to

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