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: Mon, 15 Mar 2010 16:48:52 +0100
User-agent: RoundCube Webmail/0.2

> 
> Ok so finally I get loads of linker errors :
> 
> clang  -shared -Wl,--enable-auto-image-base
> -Wl,--out-implib,./obj/libobjc.dll.a  -Wl,--enable-auto-import -g
> -ltoydispatch      -o ./obj/objc-4.dll obj/class.c.o obj/class_table.c.o
> obj/encoding.c.o obj/hash_table.c.o obj/exception.c.o obj/gc.c.o
> obj/hash.c.o obj/init.c.o obj/misc.c.o obj/nil_method.c.o
obj/objects.c.o
> obj/protocol.c.o obj/runtime.c.o obj/sarray.c.o obj/selector.c.o
> obj/sendmsg.c.o obj/thr.c.o obj/libobjc_entry.c.o obj/NSBlocks.m.o
> obj/NXConstStr.m.o obj/Object.m.o obj/Protocol.m.o
obj/blocks_runtime.m.o
> obj/linking.m.o obj/mutation.m.o obj/properties.m.o obj/sync.m.o   -L
> toydispatch/obj   -L/home/Vincent/GNUstep/Library/Libraries
> -L/GNUstep/Local/Library/Libraries -L/GNUstep/System/Library/Libraries  
> -lpthread -lgnustep-gui -lgnustep-base -lws2_32 -ladvapi32 -lcomctl32
> -luser32 -lcomdlg32 -lmpr -lnetapi32 -lm -I. 
> Creating library file:
> ./obj/libobjc.dll.aobj/class_table.c.o:fake:(.data+0x34): multiple
> definition of `_objc_lookup_class'
> obj/class.c.o:fake:(.data+0x0): first defined here
> obj/class_table.c.o:fake:(.data+0x38): multiple definition of
> `_objc_load_callback'
> obj/class.c.o:fake:(.data+0xbc): first defined here
> obj/class_table.c.o:fake:(.data+0x3c): multiple definition of
> `_objc_object_alloc'
> obj/class.c.o:fake:(.data+0xc0): first defined here
> obj/class_table.c.o:fake:(.data+0x40): multiple definition of
> `_objc_object_copy'
> obj/class.c.o:fake:(.data+0xc4): first defined here
> obj/class_table.c.o:fake:(.data+0x44): multiple definition of
> `_objc_object_dispose'
> obj/class.c.o:fake:(.data+0xc8): first defined here
> obj/class_table.c.o:fake:(.data+0x48): multiple definition of
> `_objc_malloc'
> obj/class.c.o:fake:(.data+0xcc): first defined here
> obj/class_table.c.o:fake:(.data+0x4c): multiple definition of
> `_objc_atomic_malloc'
> obj/class.c.o:fake:(.data+0xd0): first defined here
> obj/class_table.c.o:fake:(.data+0x50): multiple definition of
> `_objc_valloc'
> obj/class.c.o:fake:(.data+0xd4): first defined here
> obj/class_table.c.o:fake:(.data+0x54): multiple definition of
> `_objc_realloc'
> obj/class.c.o:fake:(.data+0xd8): first defined here
> obj/class_table.c.o:fake:(.data+0x58): multiple definition of
> `_objc_calloc'
> obj/class.c.o:fake:(.data+0xdc): first defined here
> obj/class_table.c.o:fake:(.data+0x5c): multiple definition of
`_objc_free'
> obj/class.c.o:fake:(.data+0xe0): first defined here
> obj/class_table.c.o:fake:(.data+0x60): multiple definition of
> `__objc_msg_forward'
> obj/class.c.o:fake:(.data+0xe4): first defined here
> obj/class_table.c.o:fake:(.data+0x64): multiple definition of
> `__objc_msg_forward2'
> obj/class.c.o:fake:(.data+0xe8): first defined here
> ...
> fu000001.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
> fu000004.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
> fu000006.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
> fu000008.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
> fu000010.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
> fu000012.o:(.idata$2+0xc): more undefined references to
> `libmsvcrt_a_iname' follow
> nmth000000.o:(.idata$4+0x0): undefined reference to `_nm___iob
> 
> 
> 
> I have a question, when using clang does it use linker from binutils or
> does it have 
> its own linker ?
> 

There are really some issues with dllexport/dllimport because when I
comment them :

#  define objc_EXPORT  /*__declspec(dllexport)*/
#  define objc_DECLARE /*__declspec(dllexport)*/

I only get the following errors :

Creating library file: ./obj/libobjc.dll.a
obj/hash_table.c.o: In function `create_queue':
C:\GNUstep\home\Vincent\libobjc2\hash_table.c:8: undefined reference to
`toy_dispatch_queue_create'
obj/hash_table.c.o: In function `objc_collect_garbage_data':
C:\GNUstep\home\Vincent\libobjc2\hash_table.c:13: undefined reference to
`toy_dispatch_async_f'
obj/properties.m.o: In function `lock_spinlock':
C:\GNUstep\home\Vincent\libobjc2\properties.m:56: undefined reference to
`sleep'
fu000001.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000004.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000006.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000008.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000010.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000012.o:(.idata$2+0xc): more undefined references to
`libmsvcrt_a_iname' follow
nmth000000.o:(.idata$4+0x0): undefined reference to `_nm___iob'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see
invocation)


and now I think it's more a problem with mingw than with clang.





reply via email to

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