Please check out Justice League Unlimited MUX !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Starting Out Sat May 26, 2007 [6:07 PM]
Jotham
Email not supplied
member since: May 26, 2007
Reply
I have been interested in learning how to code a mud for quite a while so I decided to jus ttry and run on on my own computer turn tweak with and learn as I go. First I chose the mud I like to play and build on and I chose the Dystopia code base. I downloaded the Dystopia 1.4 code from http://www.dystopiamud.dk/ and tried to compile it with cygwin. When I try to compile I get and error message. When I look at the log it reads this:

Build Log

--------------------Configuration: string - Win32 Debug--------------------

Command Lines
Creating temporary file "C:\DOCUME~1\STEVEN~1\LOCALS~1\Temp\RSP3A.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/string.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\Mudding\dystopia\src\string.c"
]
Creating command line "cl.exe @C:\DOCUME~1\STEVEN~1\LOCALS~1\Temp\RSP3A.tmp"
Output Window
Compiling...
string.c
d:\mudding\dystopia\src\merc.h(25) : fatal error C1083: Cannot open include file: 'sys/cdefs.h': No such file or directory
Error executing cl.exe.



Results
string.obj - 1 error(s), 0 warning(s)

Now I have not actually done any coding on it yet and I was wondering if someone could give me a bit of help just sorting this out. Thanks


2. RE: Starting Out Sun May 27, 2007 [1:11 AM]
Tyche
Email not supplied
member since: Apr 4, 2000
In Reply To
Reply
cl.exe is Microsoft Visual C++. How is this related to Cygwin?
The Sourcery - http://sourcery.dyndns.org
TeensyMud - http://teensymud.kicks-ass.org
"A man can receive nothing, except it be given him from heaven."


3. RE: Starting Out Sun May 27, 2007 [2:25 AM]
Epilogy
Email not supplied
member since: Mar 9, 2006
In Reply To
Reply
Be much better off skipping cygwin altogether and getting the real thing. I've sat down with 2 other people that I consider capable when it comes to C, and still was not able to get the codebase to compile under cygwin. It just really does not like Diku and its derivatives, I guess.


4. RE: Starting Out Sun May 27, 2007 [6:06 AM]
Jotham
Email not supplied
member since: May 26, 2007
In Reply To
Reply
Okay if it is to be done in C++ i have visual basic c++ installed i just don't know which file to open to start the project so that I can complie it. I know this is really a noob qustion but which file is the one that is to be opened so i can complie the whole thing.


5. RE: Starting Out Sun May 27, 2007 [11:43 AM]
Scorpy
Email not supplied
member since: Jan 11, 2003
In Reply To
Reply
I found Dystopia 1.4 to compile easily in cygwin with very little changes required.
Imperium et Respectus
Scorpion-ice


6. RE: Starting Out Sun May 27, 2007 [11:55 AM]
Jotham
Email not supplied
member since: May 26, 2007
In Reply To
Reply
strange when i went to do it i got an error
what change did you make


7. RE: Starting Out Sun May 27, 2007 [3:43 PM]
Jotham
Email not supplied
member since: May 26, 2007
In Reply To
Reply
mostly what i get is the warring about logf and i am not sure how to take care of this unless i have to go through the eniter code and and the logf function


8. RE: Starting Out Sun May 27, 2007 [5:10 PM]
Scorpy
Email not supplied
member since: Jan 11, 2003
In Reply To
Reply
Either add '-fno-builtin-logf' into your makefile or rename the function/calls.

As for the changes I made, the ones I mostly remember were within comm.c

As for:

d:\mudding\dystopia\src\merc.h(25) : fatal error C1083: Cannot open include file: 'sys/cdefs.h': No such file or directory

I don't think you have all the packages required installed with your cygwin.
Imperium et Respectus
Scorpion-ice


9. RE: Starting Out Sun May 27, 2007 [5:16 PM]
Jotham
Email not supplied
member since: May 26, 2007
In Reply To
Reply
i have fixed the logf warnings by changi8ng them to log_f the major problem that comm.c:48:48 execinfo.h: No such file or directory.
the rest are warnings in comm.c about implicit declaration of function


10. RE: Starting Out Sun May 27, 2007 [6:52 PM]
Scorpy
Email not supplied
member since: Jan 11, 2003
In Reply To
Reply
#if !defined(__CYGWIN__) && !defined(__FreeBSD__)
#include <execinfo.h> // internal backtraces.
#endif
Imperium et Respectus
Scorpion-ice


11. RE: Starting Out Mon May 28, 2007 [7:52 AM]
Jotham
Email not supplied
member since: May 26, 2007
In Reply To
Reply
Onkay once i make all those changes that last error that i am getting that iam not sure how to handle is
gcc: unrecognized option -rdynamic

is this error in the makefile and if so how can i repair this.
thanks for your help so far


12. RE: Starting Out Mon May 28, 2007 [10:44 AM]
Scorpy
Email not supplied
member since: Jan 11, 2003
In Reply To
Reply
It's fine to just remove it.

(Comment added by Scorpy on Mon May 28 11:45:34 2007)

Yes it is within the Makefile, sorry, forgot to write that too.
Imperium et Respectus
Scorpion-ice


13. Undefined refrence Mon May 28, 2007 [10:59 AM]
Jotham
Email not supplied
member since: May 26, 2007
In Reply To
Reply
I have tried to look up on how to define the refernces that are telling me that are undifined. I have searched but no luck so far. the refrences are all in the comm.c file

they are _gethostbyaddr_r
_backtrace
_backtrace_symbols
those are all the erros that are showing


14. RE: Undefined refrence Mon May 28, 2007 [12:47 PM]
Scorpy
Email not supplied
member since: Jan 11, 2003
In Reply To
Reply
You'll need to use alternative calls to get around that issue.

gethostbyaddr() for example, but that isn't thread safe, so you'll need to lock the mutex whilst using it, just remember to release after.

As for your internal backtrace function, just wrap the contents of the function within the #if statements that you used on the header call.
Imperium et Respectus
Scorpion-ice




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]