[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Running the server
. . -> [Subject]  Compiling Smaug With Cygwin

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Compiling Smaug With Cygwin

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Yakir   (17 posts)  [Biography] bio
Date Fri 17 Aug 2001 01:23 AM (UTC)  quote  ]

Amended on Fri 17 Aug 2001 01:24 AM (UTC) by Yakir

Message
Ok, I've finaly gotten Cygwin, but I'm having a problem with the compile. I did everything /exactly/ like it said on your Cygwin 'how to compile' page, but I got stuck here:


yakir@YAKIR /home/smaug/dist/src
make $
make smaug
'make[1]: Entering directory `/home/smaug/dist/src
rm -f smaug
gcc -lcrypt -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o b
oards.o build.o clans.o comm.o comments.o const.o db.o deity.o fight.o handler.o
hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o mapout.o misc.o mpxset.o
mud_comm.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o sk
ills.o special.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o pl
anes.o imm_host.o colorize.o
usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cann/
ot find -luser32
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
'make[1]: Leaving directory `/home/smaug/dist/src
make: *** [all] Error 2

yakir@YAKIR /home/smaug/dist/src
$


If it helps, my MAKEFILE is in the next post. I /did/, by the way, change the original Makefile to Makefile.Unix and Makefile.Cygwin to Makefile.
[Go to top] top

Posted by Yakir   (17 posts)  [Biography] bio
Date Reply #1 on Fri 17 Aug 2001 01:25 AM (UTC)  quote  ]
Message
Here is the Makefile:


CC = gcc
#PROF = -p
NOCRYPT =

# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket

#Uncomment the line below if you are getting a line like:
#interp.c:757: warning: int format, time_t arg (arg 7)
#TIME = -DTIMEFORMAT

#Uncomment the line below if you are getting implicit decleration of re_exec
#REG = -DREGEX

#Uncomment the line below if you are getting undefined re_exec errors
#NEED_REG = -lregex

#Uncomment the line below if you are getting undefined crypt errors
NEED_CRYPT = -lcrypt

#DBUGFLG = -DREQUESTS

#Uncomment the line below if you want a performance increase though beware
#your core files may not be as much of a benefit if you do.
#OPT_FLAG = -finline-functions -funroll-loops -fdefer-pop -fstrength-reduce

C_FLAGS = $(OPT_FLAG) -O -g3 -Wall -Wuninitialized $(PROF) $(NOCRYPT) $(DBUGFLG) -DSMAUG $(SOLARIS_FLAG) $(TIME) $(REG)
L_FLAGS = $(OPT_FLAG) $(PROF) $(SOLARIS_LINK) $(NEED_CRYPT) $(NEED_REG)

#Uncomment the next three comments below if you want to use IMC
#USE_IMC = -DUSE_IMC

#IMC_OFILES = imc.o imc-mail.o imc-interp.o imc-util.o imc-config.o \
# imc-events.o imc-version.o imc-mercbase.o ice.o icec.o icec-mercbase.o

#IMC_CFILES = imc.c imc-mail.c imc-interp.c imc-util.c imc-config.c \
# imc-events.c imc-version.c imc-mercbase.c ice.c icec.c icec-mercbase.c

O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o \
build.o clans.o comm.o comments.o const.o db.o deity.o fight.o \
handler.o hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o \
mapout.o misc.o mpxset.o mud_comm.o mud_prog.o player.o polymorph.o \
requests.o reset.o save.o shops.o skills.o special.o tables.o \
track.o update.o grub.o stat_obj.o ban.o services.o planes.o \
imm_host.o $(IMC_OFILES) colorize.o

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c boards.c \
build.c clans.c comm.c comments.c const.c db.c deity.c fight.c \
handler.c hashstr.c ibuild.c ident.c interp.c magic.c makeobjs.c \
mapout.c misc.c mpxset.c mud_comm.c mud_prog.c player.c polymorph.c \
requests.c reset.c save.c shops.c skills.c special.c tables.c \
track.c update.c grub.c stat_obj.c ban.c services.c planes.c \
imm_host.c $(IMC_CFILES) colorize.c

H_FILES = mud.h bet.h imc-config.h imc-mercbase.h imc-mercdefs.h imc.h \
ice.h icec.h icec-mercbase.h

all:
make smaug

smaug: $(O_FILES)
rm -f smaug
$(CC) $(L_FLAGS) $(USE_IMC) -o smaug $(O_FILES)
chmod g+w smaug.exe
chmod a+x smaug.exe
chmod g+w $(O_FILES)

.c.o: mud.h
$(CC) -c $(C_FLAGS) $(USE_IMC) $<

clean:
rm -f *.o smaug *~


If anyone could help me with this, I would be very greatful. =P
[Go to top] top

Posted by Nick Gammon   Australia  (18,800 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Fri 17 Aug 2001 02:07 AM (UTC)  quote  ]
Message
Judging by this line:


usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32


The linker cannot find the file: libuser32.a

The "-l" option says to use a library, and automatically puts "lib" at the front, and ".a" at the back.

In my case I have that file in the /usr/lib directory, you might want to check it is there.

eg.


$ cd /usr/lib
ls *user*


libuser32.a libuserenv.a


My version seems to be 2.95.2-6, whereas you have 2.95.3-5. That might make a difference, maybe.

It might be worth checking you installed everything when you got Cygwin, maybe you left out some things, which happened to include that library.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,063 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]