Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ compiling under Cygnus

compiling under Cygnus

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 3  

Posted by Bob The Hydra   (19 posts)  Bio
Date Reply #15 on Fri 13 Apr 2001 11:32 PM (UTC)
Message
At the risk of sounding like an airhead...
Where exactly do I put the #Define NOCRYPT in mud.h? I put it in there befroe I ever tried to compile it.
Also -Dnocrypt doesn't seem to work.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #16 on Sat 14 Apr 2001 12:46 AM (UTC)
Message
Pretty-well anywhere (eg. near the start). It is:


#define NOCRYPT


not #Define.


As for the makefile, I don't have it on me right now, but the changes would look like this (lifted from the forum section about recompiling ROM).


CC = gcc
PROF = -O -g
NOCRYPT = -DNOCRYPT
C_FLAGS = -Wall $(PROF) $(NOCRYPT) -DOLD_RAND


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Bob The Hydra   (19 posts)  Bio
Date Reply #17 on Sat 14 Apr 2001 12:57 AM (UTC)
Message
Ok, I put it at the beginning of mud.h as #define NOCRYPT and in the makefile as you said but I still get those errors.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #18 on Sat 14 Apr 2001 01:22 AM (UTC)
Message
You might need to force a recompile. Do:


rm *.o


and then:


make


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Pharas   USA  (9 posts)  Bio
Date Reply #19 on Mon 16 Apr 2001 07:35 AM (UTC)
Message
if you have the newest version of cygwin(and by that i mean you downloaded the setup.exe) then you have the crypt.h file. all you need to do is add #include <crypt.h> to the top of those files that gave you errors, with the other includes. then in your makefile add -lcrypt to the line that says this, $(CC) $(L_FLAGS) $(USE_IMC) -g -o smaug.exe $(O_FILES) -lcrypt. now you have encrypted passwords.
Top

Posted by Cylent   (6 posts)  Bio
Date Reply #20 on Fri 20 Apr 2001 01:25 AM (UTC)
Message
Hi,

Attempting to compile smaug1.4a under Win98/CygnusB19 and getting many errors re: files not found (comm.c 60 -> netinit/in_systm.h). I'm assuming that perhaps this should be commented out like regex references?

Is there a full-blown detailed list of what should be modified/deleted for successful compiling? It was by chance I read about the regex references. TIA!
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #21 on Fri 20 Apr 2001 03:33 AM (UTC)
Message
The second post on this subject (page 1) is the complete list.

I had not commented out the line about:


#include <netinet/in_systm.h>


I can only assume that your Cygwin installation is somehow incomplete.

Personally I installed everything, perhaps you left bits out (of Cygwin).





- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Cylent   (6 posts)  Bio
Date Reply #22 on Mon 23 Apr 2001 04:47 PM (UTC)
Message
Thanks for the reply Nick. Everything compiles, up to interp.c then I get:

interp.c: In function `update_userec':
interp.c:1192: warning: implicit declaration of function `timerisset'
interp.c:1192: warning: implicit declaration of function `timercmp'
interp.c:1192: parse error before `<'
interp.c: At top level:
interp.c:1197: parse error before `if'
make[1]: *** [interp.o] Error 1
make: *** [all] Error 2

which is:

void update_userec(struct timeval *time_used, struct timerset *userec)
{
userec->num_uses++;
if ( !timerisset(&userec->min_time) || timercmp(time_used, &userec->min_time, <) >
{
userec->min_time.tv_sec = time_used->tv_sec;
userec->min_time.tv_usec = time_used->tv_usec;
}
if ( !timerisset(&userec->max_time) || timercmp(time_used, &userec->max_time, >) >
{
userec->max_time.tv_sec = time_used->tv_sec;
userec->max_time.tv_usec = time_used->tv_usec;
}
userec->total_time.tv_sec += time_used->tv_sec;
userec->total_time.tv_usec += time_used->tv_usec;
while ( userec->total_time.tv_usec >= 1000000 )
{
userec->total_time.tv_sec++;
userec->total_time.tv_usec -= 1000000;
}
return;
}

I do have:
...
#define __rtems__
#include <time.h>
...

and I'm almost positive I installed the complete Cygnus B19 and I use the cygnus.bat to get the shell running.
Again, any help most appreciated.

-7om
Top

Posted by Cylent   (6 posts)  Bio
Date Reply #23 on Mon 23 Apr 2001 10:41 PM (UTC)

Amended on Mon 23 Apr 2001 10:58 PM (UTC) by Cylent

Message
Hi,

Well, I grabbed the latest Cygnus (setup.exe and installed it). Everything compiled ok (smaug1.4a). After a make clean/make smaug everything came out fine. Thanks to all for the feedback! Now, is it possible to create a smaug.exe that doesn't require the cygwin1.dll? Just curious. Thanks again.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #24 on Mon 23 Apr 2001 11:18 PM (UTC)
Message
May as well copy and paste the relevant macros into mud.h or the top of the source file that is causing the problems. That should fix it (the brute-force way) ...



/* Convenience macros for operations on timevals.
   NOTE: `timercmp' does not work for >= or <=.  */
#define timerisset(tvp)   ((tvp)->tv_sec || (tvp)->tv_usec)
#define timerclear(tvp)   ((tvp)->tv_sec = (tvp)->tv_usec = 0)
#define timercmp(a, b, CMP)                   \
  (((a)->tv_sec == (b)->tv_sec) ?                 \
   ((a)->tv_usec CMP (b)->tv_usec) :                \
   ((a)->tv_sec CMP (b)->tv_sec))
#define timeradd(a, b, result)                  \
  do {                        \
    (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;           \
    (result)->tv_usec = (a)->tv_usec + (b)->tv_usec;            \
    if ((result)->tv_usec >= 1000000)               \
      {                       \
  ++(result)->tv_sec;                 \
  (result)->tv_usec -= 1000000;               \
      }                       \
  } while (0)
#define timersub(a, b, result)                  \
  do {                        \
    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;           \
    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;            \
    if ((result)->tv_usec < 0) {                \
      --(result)->tv_sec;                 \
      (result)->tv_usec += 1000000;               \
    }                       \
  } while (0)



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #25 on Mon 23 Apr 2001 11:21 PM (UTC)
Message
Quote:

Well, I grabbed the latest Cygnus (setup.exe and installed it). Everything compiled ok (smaug1.4a). After a make clean/make smaug everything came out fine. Thanks to all for the feedback! Now, is it possible to create a smaug.exe that doesn't require the cygwin1.dll? Just curious. Thanks again.


Ah yes, well that is the better way of doing it. :)

To work without the cygwin1.dll you need to use a different compiler. The version I did with Microsoft Visual C++ didn't need the DLL, however that is not a free compiler.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Cylent   (6 posts)  Bio
Date Reply #26 on Tue 24 Apr 2001 02:38 AM (UTC)
Message
Hi,

Right. I've got VC 4.5 and that won't read the project files (I think you mentioned you had VC6). No matter, long as I can get it to compile.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #27 on Tue 24 Apr 2001 04:45 AM (UTC)
Message
Basically you create a new project and add the .c files into it. These are:



act_comm.c
act_info.c
act_move.c
act_obj.c
act_wiz.c
ban.c
boards.c
build.c
clans.c
comm.c
comments.c
const.c
db.c
deity.c
fight.c
grub.c
handler.c
hashstr.c
ibuild.c
ice.c
icec-mercbase.c
icec.c
ident.c
imc-config.c
imc-events.c
imc-interp.c
imc-mail.c
imc-mercbase.c
imc-util.c
imc-version.c
imc.c
imm_host.c
interp.c
magic.c
makeobjs.c
mapout.c
misc.c
mpxset.c
mud_comm.c
mud_prog.c
planes.c
player.c
polymorph.c
requests.c
reset.c
save.c
services.c
shops.c
skills.c
special.c
stat_obj.c
tables.c
track.c
update.c



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zechy   (5 posts)  Bio
Date Reply #28 on Tue 22 Jan 2002 11:45 AM (UTC)
Message
Hi, could you teach me how to compile in VC++6? I have the compiler but i don't know how to compile.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #29 on Tue 22 Jan 2002 08:30 PM (UTC)
Message
Create a project, add the appropriate files to it, and then "build" it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


97,933 views.

This is page 2, subject is 3 pages long:  [Previous page]  1  2 3  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.