Pages:<< prev 1 next >>
![*](https://smaugmuds.afkmods.com/skins/default/mbicons/question.gif)
![](https://smaugmuds.afkmods.com/skins/default/images/noavatar.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Fledgling
![](https://smaugmuds.afkmods.com/skins/default/images/0.png)
GroupMembers
Posts2
JoinedOct 21, 2013
I am getting the following error when I try to compile AFKMud 2.1.5:
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!
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!
![](https://smaugmuds.afkmods.com/avatars/matrix.gif)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Apprentice
![](https://smaugmuds.afkmods.com/skins/default/images/1.png)
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
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](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![](https://i302.photobucket.com/albums/nn96/quixadhal/800474795_100.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Conjurer
![](https://smaugmuds.afkmods.com/skins/default/images/3.png)
GroupMembers
Posts395
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.
man unlink reports unistd.h, for Debian linux... and I would think it would be in a similar place for most unix-varients.
![](https://smaugmuds.afkmods.com/skins/default/images/noavatar.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Fledgling
![](https://smaugmuds.afkmods.com/skins/default/images/0.png)
GroupMembers
Posts2
JoinedOct 21, 2013
Okay, so the includes in bits.cpp look like this:
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.
#if defined(WIN32) #include <unistd.h> #endif #include <fstream> #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
![Post is unread](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![](https://smaugmuds.afkmods.com/avatars/matrix.gif)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Apprentice
![](https://smaugmuds.afkmods.com/skins/default/images/1.png)
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 >>