Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Yesterday, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!, Google, DotBot

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 2: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, 3:49 am   Last edited Oct 21, 2013, 4: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, 4: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, 5:28 am   Last edited Oct 21, 2013, 5: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 <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<unistd.h> 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, 8: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 >>