Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
AhrefsBot, Yandex, Bing

Members: 0
Guests: 40
Stats
Files
Topics
Posts
Members
Newest Member
489
3,791
19,644
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » AFKMud Support & Development » Compiling AFKMud 2.1.5
Forum Rules | Mark all | Recent Posts

Compiling AFKMud 2.1.5
< Newer Topic :: Older Topic > Errors

Pages:<< prev 1 next >>
* #1 Oct 21, 2013 4:36 am   
Go to the top of the page
Go to the bottom of the page

dgarman
Fledgling
GroupMembers
Posts2
JoinedOct 21, 2013

 
I am getting the following error when I try to compile AFKMud 2.1.5:


bits.cpp: In function ‘void load_oldbits()’:
bits.cpp:145:28: error: ‘unlink’ was not declared in this scope


I am trying to compile it on a machine using the latest version of Lubuntu. Does anyone have a fix for this, or can you tell me what my first step in fixing this should be? Thank you in advance for your help!

Post is unread #2 Oct 21, 2013 5:49 am   Last edited Oct 21, 2013 6:12 am by Enigma_EQ
Go to the top of the page
Go to the bottom of the page

Enigma_EQ
Apprentice
GroupMembers
Posts65
JoinedJun 27, 2011

 
I'm having similar problems as well...

looks like during the make process it's useing some functions from the files instead of just preparing them...

I should have all the cygwin stuff installed
-------------------------------------------------------------
Enigma@network-3099350 ~/afkmud/src
$ make clean
make all
make[1]: Entering directory '/home/Enigma/afkmud/src'
Building AFKMud....
make -j2 -s afkmud
make[2]: Entering directory '/home/Enigma/afkmud/src'
Compiling o/imc.o....
Compiling o/act_comm.o....
Compiling o/act_info.o....
Compiling o/act_move.o....
Compiling o/act_obj.o....
Compiling o/act_wiz.o....
Compiling o/archery.o....
Compiling o/area.o....
Compiling o/areaconvert.o....
Compiling o/auction.o....
Compiling o/ban.o....
Compiling o/bits.o....
Compiling o/boards.o....
bits.cpp: In function `void load_oldbits()':
bits.cpp:145:28: error: `unlink' was not declared in this scope
Makefile:169: recipe for target 'o/bits.o' failed
make[2]: *** [o/bits.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/Enigma/afkmud/src'
Makefile:106: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/Enigma/afkmud/src'
Makefile:149: recipe for target 'clean' failed
make: *** [clean] Error 2

Post is unread #3 Oct 21, 2013 6:50 am   
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

 
Well, look up which system header unlink() is contained in for your particular operating system.

man unlink reports unistd.h, for Debian linux... and I would think it would be in a similar place for most unix-varients.

Post is unread #4 Oct 21, 2013 7:28 am   Last edited Oct 21, 2013 7:40 am by dgarman
Go to the top of the page
Go to the bottom of the page

dgarman
Fledgling
GroupMembers
Posts2
JoinedOct 21, 2013

 
Okay, so the includes in bits.cpp look like this:

#if defined(WIN32)
#include 
#endif
#include 
#include "mud.h"
#include "bits.h"

So if I take out the if statement and just include unistd.h maybe it will work, except I get the same error in other files so I am going to have to grep for unlink and make the change in all those files. Is this correct?

EDIT: Okay I tried this, and I only needed to #include in two other files, pfiles.cpp, and db.cpp, and it compiles. I still get a bunch of warnings, but I will look at those later I suppose. I hope this helps.

Post is unread #5 Oct 21, 2013 10:28 pm   
Go to the top of the page
Go to the bottom of the page

Enigma_EQ
Apprentice
GroupMembers
Posts65
JoinedJun 27, 2011

 
I also had to remove comm.cpp line 44 to get it to compile without error... working now thanks...

Pages:<< prev 1 next >>