gnustep-dev
[Top][All Lists]
Advanced

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

[Windows] : gnustep-base


From: Vincent Richomme
Subject: [Windows] : gnustep-base
Date: Tue, 16 Mar 2010 14:34:06 +0100
User-agent: RoundCube Webmail/0.2

Hi,

Here are some remarks about building gnustep-base on windows(mingw-w64):

$>./configure --prefix=/GNUstep --enable-libffi
--with-default-config=/GNUstep/GNUstep.conf
...
checking for socklen_t... no
...


That's not true since socklen_t is defined as int in header <ws2tcpip.h>.
Unfortunately I dont' know autotools very well so I cannot provide any
patch
but basically configure should be adapted to include this header when
testing on
mingw platforms.

result is we have lots of warnings like :

NSFileHandle+GNUstepBase.m: In function '-[NSFileHandle(GNUstepBase)
initAsServerAtAddress:service:protocol:]':
NSFileHandle+GNUstepBase.m:176: warning: pointer targets in passing
argument 3 of 'getsockname' differ in signedness
c:/developer/mingw-ng/mingw32/lib/gcc/../../i686-w64-mingw32/include/winsock2.h:1300:
note: expected 'int *' but argument is of type 'unsigned int *'
NSFileHandle+GNUstepBase.m: In function '-[NSFileHandle(GNUstepBase)
socketAddress]':
NSFileHandle+GNUstepBase.m:205: warning: pointer targets in passing
argument 3 of 'getsockname' differ in signedness
c:/developer/mingw-ng/mingw32/lib/gcc/../../i686-w64-mingw32/include/winsock2.h:1300:
note: expected 'int *' but argument is of type 'unsigned int *'
So the workaround is to manually edit
Headers/Additions/GNUstepBase/config.h
#define HAVE_SOCKLEN_T 1


You also need to change the variable type in
Source/Additions/NSFileHandle+GNUstepBase.m
from unsigned int to socklen_t

-unsigned int           size = sizeof(sin);
+socklen_t              size = sizeof(sin);


Then I got an error in Tools/gdomap.c:

gdomap.c:4599: error: 'uint32_t' undeclared (first use in this function)

So same fix as before I have included <stdint.h> in  __MINGW32__ section

#ifdef __MINGW32__
+#include <stdint.h>
...

Another remark, I was curious to test a dlfcn implementation on win32
http://code.google.com/p/dlfcn-win32/

so after running configure again, dlfcn.h is well detected however
during linking -ldl is not added to command line so I get undefined
references:

Creating library file: ./obj/libgnustep-base.dll.a
obj/libgnustep-base.obj/objc-load.m.o: In function `_objc_dynamic_link':
C:\Developer\Mingw-NG\home\Vincent\build_GNUstep\gnustep-base\Source/dynamic-load.h:65:
undefined reference to `dlopen'
obj/libgnustep-base.obj/objc-load.m.o: In function `_objc_dynamic_error':
C:\Developer\Mingw-NG\home\Vincent\build_GNUstep\gnustep-base\Source/dynamic-load.h:94:
undefined reference to `dlerror'
collect2: ld returned 1 exit status


And my final issue is about Install directory because everything is
installed in /GNUstep/Local ...
but I want it to be in /GNUstep/System.
HOW CAN I CHANGE THAT ?

For my next remarks I will try to post patch instead of writing emails







reply via email to

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