I hate to bring up this old chestnut, but I all of a sudden I need
gnuclient, and trying to run an executable copied from some other
distribution just gives me the heebie-jeebies. So I'm trying to do
the right thing and build them natively using VC5.
After some quick but crude code-surgery (see below), I can compile,
BUT I CAN'T LINK! I've tried adding random libraries to the link
path, but none seem to make any difference. I'm sure this problem has
been solved before. Any hints?
Thanks,
-paul
OS version: Microsoft Windows 2000 [Version 5.00.2195]
OS: Windows_NT
XEmacs 21.5-b2 \"artichoke\" configured for `i586-pc-win32'.
Building XEmacs in \"C:\\src\\xemacs\\nt\".
Using compiler \"cl -nologo -W3 -O2 -G5 -ML\".
Installing XEmacs in \"c:\\Program Files\\XEmacs\\XEmacs-21.5-b2\".
Package path is \"~\\.xemacs;;c:\\Program Files\\XEmacs\\site-packages;c:\\Program
Files\\XEmacs\\xemacs-packages\".
Compiling in support for Microsoft Windows native GUI.
Compiling in support for XPM images.
Compiling in support for GIF images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for toolbars.
Compiling in support for dialogs.
Compiling in support for widgets.
Compiling in support for native sounds.
Compiling in fast dired implementation.
--------------------------------------------------------------------
cd C:\src\xemacs\nt\..\lib-src
gnuserv.c
C:\src\xemacs\nt\..\lib-src/gnuserv.c(675) : warning C4761: integral size mismatch in
argument; conversion supplied
C:\src\xemacs\nt\..\lib-src/gnuserv.c(677) : warning C4761: integral size mismatch in
argument; conversion supplied
gnuserv.obj : error LNK2001: unresolved external symbol _tmpdir
gnuserv.obj : error LNK2001: unresolved external symbol _progname
gnuserv.obj : error LNK2001: unresolved external symbol _send_string
gnuserv.obj : error LNK2001: unresolved external symbol _getuid
gnuserv.obj : error LNK2001: unresolved external symbol _internet_addr
C:\src\xemacs\nt\..\lib-src/gnuserv.exe : fatal error LNK1120: 5 unresolved externals
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Index: gnuserv.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/lib-src/gnuserv.h,v
retrieving revision 1.8
diff -u -c -r1.8 gnuserv.h
*** gnuserv.h 2001/06/10 10:42:17 1.8
--- gnuserv.h 2001/08/20 16:15:39
***************
*** 103,109 ****
--- 103,112 ----
#endif /* No communication method pre-defined */
#include <sys/types.h>
+ #ifdef WIN32_NATIVE
+ #else
#include <sys/param.h>
+ #endif
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
***************
*** 145,150 ****
--- 148,202 ----
#endif /* SYSV_IPC */
+ #ifdef WIN32_NATIVE
+ #include <io.h>
+ #include "systime.h" /* gets the FD_* defines */
+ #define DONT_USE_LITOUT
+ #define TABLE_SIZE 101 /* The number of entries in the hash table */
+ #define HASH(host) host /* Rather simplistic hash function */
+ #define DEFAULT_PORT 21490 /* default port number to use is
+ * DEFAULT_PORT + uid */
+ typedef ssize_t socklen_t;
+ /* Note: winsock.h already included in systime.h above */
+ /* map winsock error codes to standard names */
+ #define EWOULDBLOCK WSAEWOULDBLOCK
+ #define EINPROGRESS WSAEINPROGRESS
+ #define EALREADY WSAEALREADY
+ #define ENOTSOCK WSAENOTSOCK
+ #define EDESTADDRREQ WSAEDESTADDRREQ
+ #define EMSGSIZE WSAEMSGSIZE
+ #define EPROTOTYPE WSAEPROTOTYPE
+ #define ENOPROTOOPT WSAENOPROTOOPT
+ #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+ #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+ #define EOPNOTSUPP WSAEOPNOTSUPP
+ #define EPFNOSUPPORT WSAEPFNOSUPPORT
+ #define EAFNOSUPPORT WSAEAFNOSUPPORT
+ #define EADDRINUSE WSAEADDRINUSE
+ #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+ #define ENETDOWN WSAENETDOWN
+ #define ENETUNREACH WSAENETUNREACH
+ #define ENETRESET WSAENETRESET
+ #define ECONNABORTED WSAECONNABORTED
+ #define ECONNRESET WSAECONNRESET
+ #define ENOBUFS WSAENOBUFS
+ #define EISCONN WSAEISCONN
+ #define ENOTCONN WSAENOTCONN
+ #define ESHUTDOWN WSAESHUTDOWN
+ #define ETOOMANYREFS WSAETOOMANYREFS
+ #define ETIMEDOUT WSAETIMEDOUT
+ #define ECONNREFUSED WSAECONNREFUSED
+ #define ELOOP WSAELOOP
+ /* #define ENAMETOOLONG WSAENAMETOOLONG */
+ #define EHOSTDOWN WSAEHOSTDOWN
+ #define EHOSTUNREACH WSAEHOSTUNREACH
+ /* #define ENOTEMPTY WSAENOTEMPTY */
+ #define EPROCLIM WSAEPROCLIM
+ #define EUSERS WSAEUSERS
+ #define EDQUOT WSAEDQUOT
+ #define ESTALE WSAESTALE
+ #define EREMOTE WSAEREMOTE
+ #else /* not WIN32_NATIVE */
#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
#include <sys/socket.h>
#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */
***************
*** 158,163 ****
--- 210,216 ----
#define DEFAULT_PORT 21490 /* default port number to use is
* DEFAULT_PORT + uid */
#endif /* INTERNET_DOMAIN_SOCKETS */
+ #endif /* not WIN32_NATIVE */
#ifdef UNIX_DOMAIN_SOCKETS
#include <sys/un.h>
Index: xemacs.mak
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/nt/xemacs.mak,v
retrieving revision 1.72
diff -u -c -r1.72 xemacs.mak
*** xemacs.mak 2001/07/26 06:21:45 1.72
--- xemacs.mak 2001/08/20 16:13:13
***************
*** 566,571 ****
--- 566,575 ----
# Individual dependencies
ETAGS_DEPS = $(LIB_SRC)/getopt.c $(LIB_SRC)/getopt1.c $(LIB_SRC)/../src/regex.c
$(LIB_SRC)/etags.exe : $(LIB_SRC)/etags.c $(ETAGS_DEPS)
+ $(LIB_SRC)/gnuserv.exe : $(LIB_SRC)/gnuserv.c
+ cd $(LIB_SRC)
+ $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $**
wsock32.lib -link -incremental:no setargv.obj
+ cd $(NT)
$(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
cd $(LIB_SRC)
$(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $**
wsock32.lib -link -incremental:no
***************
*** 575,580 ****
--- 579,586 ----
LIB_SRC_TOOLS = \
$(LIB_SRC)/etags.exe \
+ $(LIB_SRC)/gnuclient.exe \
+ $(LIB_SRC)/gnuserv.exe \
$(LIB_SRC)/hexl.exe \
$(LIB_SRC)/i.exe \
$(LIB_SRC)/make-docfile.exe \