On Sat, 06 Mar 2010 14:29:14 +0100, Vincent Richomme <[email protected]> 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. _______________________________________________ Gnustep-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnustep-dev
