[NEWBIE] Problems compiling w/ gcc under OS/2

From: Timothy Millea (tmillea@NFINITY.COM)
Date: 07/30/98


I'm trying to compile CM3.0bpl11 w/ gcc under OS/2 Warp 3.0.

I have installed all the files that the install program told me to.. and the only compile errors/warnings I
get are with comm.c and olc.c, and the link errors are w/ comm.c and utils.c. It looks like a lib is
missing, but the makefile for OS/2 has no lib section to add libraries. It looks like the socket lib is
missing. how do I add it? And why was it not included in makefile??

Any and all help appreciated :)

The make file (header portion) and conf.h are included below...

compile output as follows (not included are the files that compiled correctly):

[D:\circle\src]nmake /i

Operating System/2 Program Maintenance Utility
Version 2.000.000 Mar 27 1992
Copyright (C) IBM Corporation 1988-1991.
Copyright (C) Microsoft Corp. 1988-1991.
All rights reserved.

SYS1041: The name specified is not recognized as an
internal or external command, operable program or batch file.
        nmake ../bin/circle

Operating System/2 Program Maintenance Utility
Version 2.000.000 Mar 27 1992
Copyright (C) IBM Corporation 1988-1991.
Copyright (C) Microsoft Corp. 1988-1991.
All rights reserved.

        gcc -c -g -O -Wall  comm.c

comm.c:1463: warning: return-type defaults to `int'
comm.c: In function `checkpointing':
comm.c:1469: warning: control reaches end of non-void function
comm.c: At top level:
comm.c:1473: warning: return-type defaults to `int'
comm.c: In function `reread_wizlists':
comm.c:1478: warning: control reaches end of non-void function
comm.c: At top level:
comm.c:1482: warning: return-type defaults to `int'
comm.c: In function `unrestrict_game':
comm.c:1491: warning: control reaches end of non-void function
comm.c: At top level:
comm.c:1495: warning: return-type defaults to `int'
comm.c: In function `my_signal':
comm.c:1523: warning: assignment from incompatible pointer type
comm.c:1531: warning: return from incompatible pointer type
comm.c:1533: warning: return from incompatible pointer type
comm.c: In function `signal_setup':
comm.c:1572: warning: passing arg 2 of `my_signal' from incompatible pointer typ
e
comm.c:1573: warning: passing arg 2 of `my_signal' from incompatible pointer typ
e
comm.c:1543: warning: unused variable `interval'


olc.c: In function `do_olc':
olc.c:73: warning: `vnum' might be used uninitialized in this function
olc.c: In function `olc_string':
olc.c:287: warning: int format, long int arg (arg 3)
olc.c:295: warning: int format, long int arg (arg 3)


comm.c:225 (comm.o): Undefined symbol _srandom referenced from text segment
comm.c:303 (comm.o): Undefined symbol _socket referenced from text segment
comm.c:311 (comm.o): Undefined symbol _setsockopt referenced from text segment
comm.c:319 (comm.o): Undefined symbol _setsockopt referenced from text segment
comm.c:331 (comm.o): Undefined symbol _setsockopt referenced from text segment
comm.c:339 (comm.o): Undefined symbol __swaps referenced from text segment
comm.c:340 (comm.o): Undefined symbol __swapl referenced from text segment
comm.c:342 (comm.o): Undefined symbol _bind referenced from text segment
comm.c:348 (comm.o): Undefined symbol _listen referenced from text segment
comm.c:983 (comm.o): Undefined symbol _accept referenced from text segment
comm.c:1004 (comm.o): Undefined symbol _gethostbyaddr referenced from text segment
comm.c:1012 (comm.o): Undefined symbol __swapl referenced from text segment
utils.c:36 (utils.o): Undefined symbol _random referenced from text segment
utils.c:49 (utils.o): Undefined symbol _random referenced from text segment



Makefile as follows:

# CircleMUD 3.0 Makefile for OS/2 (manually created by David Carver)

# C compiler to use
CC = gcc

# Any special flags you want to pass to the compiler
MYFLAGS = -Wall

#flags for profiling (see hacker.doc for more information)
PROFILE =

##############################################################################
# Do Not Modify Anything Below This Line (unless you know what you're doing) #
##############################################################################

CFLAGS = -g -O $(MYFLAGS) $(PROFILE)
..


~~~
"Out the 10Base-T port, through the router, over the leased line, off
the bridge, past the firewall.... Nothin' but net..."


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST