[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  compiling under Cygnus

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: compiling under Cygnus
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  3  

Posted by Zechy   (5 posts)  [Biography] bio
Date Thu 24 Jan 2002 12:25 PM (UTC)  quote  ]
Message
Thanks.
All that info really did help.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Wed 23 Jan 2002 07:54 AM (UTC)  quote  ]
Message

Did you read How to make changes, including compiling?


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Zechy   (5 posts)  [Biography] bio
Date Wed 23 Jan 2002 07:48 AM (UTC)  quote  ]
Message
Okay, i tried compiling swr, and a file is missing, "sys/dir.h". Is it part of the cygwin package or something? I have no idea how to fix it.
[Go to top] top

Posted by Zechy   (5 posts)  [Biography] bio
Date Wed 23 Jan 2002 07:15 AM (UTC)  quote  ]
Message
Could you show me the exact procedure? And i also want to build a SWR, where can i get the source and how do i compile it?
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 22 Jan 2002 08:30 PM (UTC)  quote  ]
Message
Create a project, add the appropriate files to it, and then "build" it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Zechy   (5 posts)  [Biography] bio
Date Tue 22 Jan 2002 11:45 AM (UTC)  quote  ]
Message
Hi, could you teach me how to compile in VC++6? I have the compiler but i don't know how to compile.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 24 Apr 2001 04:45 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Cylent   (6 posts)  [Biography] bio
Date Tue 24 Apr 2001 02:38 AM (UTC)  quote  ]
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.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 23 Apr 2001 11:21 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 23 Apr 2001 11:18 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Cylent   (6 posts)  [Biography] bio
Date Mon 23 Apr 2001 10:41 PM (UTC)  quote  ]

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.
[Go to top] top

Posted by Cylent   (6 posts)  [Biography] bio
Date Mon 23 Apr 2001 04:47 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Fri 20 Apr 2001 03:33 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Cylent   (6 posts)  [Biography] bio
Date Fri 20 Apr 2001 01:25 AM (UTC)  quote  ]
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!
[Go to top] top

Posted by Pharas   USA  (9 posts)  [Biography] bio
Date Mon 16 Apr 2001 07:35 AM (UTC)  quote  ]
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.
[Go to top] 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.


15,789 views.

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

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]