Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
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
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Bing

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Trouble Compiling
Forum Rules | Mark all | Recent Posts

Trouble Compiling
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 9, 2010, 6:17 pm
Go to the top of the page
Go to the bottom of the page

Dinmenel
Fledgling
GroupMembers
Posts9
JoinedDec 9, 2010

Ok, so I've installed cygwin - just installed all packages, so I think have everything necessary. I know I have everything listed as necessary in the relevant post in this forum. I've edited the makefile for compiling in cygwin, and I get these errors when I execute make -

calendar.cpp: In function 'char* c_time<time_t, int>':
calendar.cpp:144: error: 'timezone' was not declared in this scope
calendar.cpp: error:157: 'localtime' was not declared in this scope
calendar.cpp: error:160: 'tzname' was not declared in this scope
calendar.cpp:160: error: invalid use of incomplete type 'struct tm'

and a big long list of additional errors similar to the last one.

I know nothing, so I'm pretty sure this is some mistake obvious to anyone who knows something.
       
Post is unread #2 Dec 10, 2010, 1:16 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

I've downloaded and tested the latest AFKMud in Cygwin using gcc version 4.3.4 20090804 (release) 1 (GCC) with no issue. Did a make with and without the CYGWIN in the makefile being commented out just to see for testing sake and both compiled clean (See a lot of g++: unrecognized option '-rdynamic' if you have the CYGWIN commented out in the makefile), but it is still fully compiled. The main difference is if I were to run it without the CYGWIN being defined it won't handle commands etc... correctly.
       
Post is unread #3 Dec 10, 2010, 5:50 pm
Go to the top of the page
Go to the bottom of the page

Dinmenel
Fledgling
GroupMembers
Posts9
JoinedDec 9, 2010

Meh...that's the gcc version I had.

Uninstalling Cygwin now. I'll reinstall with only the necessary packages and see.
       
Post is unread #4 Dec 11, 2010, 5:17 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

I have had problems with Cygwin fully installing. Like what your doing I uninstalled and reinstalled it doing only the ones I needed and it seemed to work right after that lol.
       
Post is unread #5 Dec 11, 2010, 4:04 pm
Go to the top of the page
Go to the bottom of the page

Dinmenel
Fledgling
GroupMembers
Posts9
JoinedDec 9, 2010

Ahhh, ok. Up and running now, with Cygwin reinstalled.

Also, once I realized that afkmud.exe must be initalized from cygwin...not double clicked. X D


Anyway, I have another question now - I'd like to change the text received when a play 'looks' at an object - doesn't seem to be something available for altering with oset. What's the method here?
       
Post is unread #6 Dec 11, 2010, 4:37 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Try oset <object> ed <what you want it to say>, if you don't like the results, try oset <object> rmed... unless it's just been too long since I played with object descriptions online, in which case you might want to consult Herne's. ;)
       
Post is unread #7 Dec 11, 2010, 5:02 pm
Go to the top of the page
Go to the bottom of the page

Dinmenel
Fledgling
GroupMembers
Posts9
JoinedDec 9, 2010

Awesome, thanks a bunch!
       
Post is unread #8 Dec 12, 2010, 12:35 pm
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Hello:

I've tried to compile this codebase too, but I can't do it well. Always find a problem with calendar.cpp.

Somebody who has been able to compile in cygwin can send me the codebase compiled? My e-mail is:

cascales05@gmail.com

If nobody can't, don't worry.... What packages do I need in cygwin?

Thanks a lot.

Antram
       
Post is unread #9 Dec 12, 2010, 1:29 pm   Last edited Dec 12, 2010, 1:32 pm by Conner
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

No problem, Dinmenel, I hope it heped. :)

I don't actually run AFKmud or cygwin, Antram, but I believe the answer has been given a few times in the past here, let me do a quick search and see if I can find it for you ..... here we go, while there are several threads that mention the answer you seek, try What Cygwin packages do I need to compile AFKMud 2.0?:
Samson said:

You will require the following above and beyond the default base install:

Development: make, g++, perl ( Makefile dependencies )
Libraries: libgd-devel ( for the overland )
Shells: tcsh

All necessary package dependencies to support these will be downloaded by the Cygwin installer. Once you have these setup you can compile and run AFKMud. You may note that crypt libraries are *NOT* required as AFKMud use the sha256 password scheme. It should also be noted that zlib libraries were installed as part of the base package during the last test made and are not required as a separate setup.

I believe that should cover your question. If not, someone with more AFKMud specific knowledge may need to speak up...

If it's not a problem with missing packages, we may need to know what problem it keeps running into with calendar.cpp in order to help. :shrug: (Generally, the more specific your question, the better the answer. In a case like this, if you can copy/paste the actual compiler error, it'd go a long way.)
       
Post is unread #10 Dec 12, 2010, 2:06 pm
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Hello again:

I reinstall cygwin again, with the packages included in your post, but doesn't work neither. This is the message wich apears in cygwin:

~/afkmud/src
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp: In function 'char* mini_c_time(time_t, int)':
calendar.cpp:185: error: 'timezone' was not declared in this scope
calendar.cpp:198: error: 'localtime' was not declared in this scope
calendar.cpp:201: error: 'tzname' was not declared in this scope
calendar.cpp:201: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:206: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:210: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:210: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:211: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:211: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:211: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:211: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:211: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
calendar.cpp:211: error: invalid use of incomplete type 'struct tm'
/usr/include/wchar.h:43: error: forward declaration of 'struct tm'
make[2]: *** [o/calendar.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/Antonio Cascales/afkmud/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/Antonio Cascales/afkmud/src'
make: *** [clean] Error 2
Antonio Cascales@antonio ~/afkmud/src
$

I hope somebody can tell me why can't compile. I know that I'm always asking, but I don't know anybody who can help me.

Thanks a lot again.
       
Post is unread #11 Dec 12, 2010, 2:34 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

You might need to wait for Samson or someone else with a bit more experience at dealing with AFKMud under Cygwin to be certain, but it sounds to me like you're calendar.cpp file is missing an include to time.h at the top of it. That really is just an educated guess though,.
       
Post is unread #12 Dec 12, 2010, 2:57 pm
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Yea!

Your're right! It's so simple as put in calendar.cpp, connhist.cpp and mud_comm.cpp the #include "time.h".

Now I am the afkmud codebase perfectly compiled.

Thanks a lot, Conner! Your're the best. :)
       
Post is unread #13 Dec 12, 2010, 3:53 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Oh, I sincerely doubt that I'm the best, but you're entirely welcome and I'm very glad that I could help out. :)
       
Post is unread #14 Dec 14, 2010, 1:42 pm
Go to the top of the page
Go to the bottom of the page

Dinmenel
Fledgling
GroupMembers
Posts9
JoinedDec 9, 2010

Hey cool...that wasn't how I got it to work, but awesome.

Anyway, I've been building for a few days now, and I've been having some problems with stability - mud has crashed several times. Just lost a bit of work because of it - crashed on foldarea. Any tips for preventing this? Or should I just save often?
       
Post is unread #15 Dec 14, 2010, 2:36 pm
Go to the top of the page
Go to the bottom of the page

Apocist
Fledgling
GroupMembers
Posts3
JoinedDec 13, 2010

I had the same problem with the calander.cpp error as well. following Conner's advice and it compiles correctly. thx!
       
Post is unread #16 Dec 15, 2010, 7:25 pm   Last edited Dec 15, 2010, 7:36 pm by Conner
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Very happy to have been able to help, hearing that it was help to more than one person with the same bit of advice is just a bonus, Apocist. :cool:

Dinmenel said:

Hey cool...that wasn't how I got it to work, but awesome.

Anyway, I've been building for a few days now, and I've been having some problems with stability - mud has crashed several times. Just lost a bit of work because of it - crashed on foldarea. Any tips for preventing this? Or should I just save often?

If you found another way to get it to work, do share, someone might eventually benefit from it. ;)

Usually the mud crashing is a bad thing, not just because you've lost your recent changes but because it denotes a code problem that needs to be fixed. So, to answer your question really requires two answers. First, to avoid losing your changes, by all means, utilize savearea often. Second, to identify the problem so you can fix it, try running gdb to see if you can find what i's actually crashing on. If gdb does tell you something that you don't understand, drop back by here and give us as much details as you can and someone will probably know what to tell you to do. You also might consider checking out this other recent thread.
       
Pages:<< prev 1 next >>