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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  logging cygwin output

logging cygwin output

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


Posted by Jobey5000   (13 posts)  [Biography] bio
Date Wed 12 May 2004 08:06 AM (UTC)
Message
is there any way to log the output from cygwin? im trying to make and getting alot of error in one file, so many its scrolls past the top of my dos window in win98.. any help?
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Wed 12 May 2004 08:46 AM (UTC)
Message
You should be able to increase the height of your buffer, by right clicking on it and pressing properties. I think even Win98 has this.

However, you should also be able to redirect make's output to a text file, like so:

make > make_log.txt

That should do the trick for you.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Jobey5000   (13 posts)  [Biography] bio
Date Reply #2 on Wed 12 May 2004 09:26 AM (UTC)

Amended on Wed 12 May 2004 09:41 AM (UTC) by Jobey5000

Message
Ok, at least now i know how to change my dos window size, thanks, it helped

make > make_log.txt makes a log but it dosent log any errors.. oh well, at least now i can do this!:


$ make
make swrip
make[1]: Entering directory `/home/admin/releaserip/src'
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS save.c
save.c: In function `load_corpses':
save.c:2133: error: `DIR' undeclared (first use in this function)
save.c:2133: error: (Each undeclared identifier is reported only once
save.c:2133: error: for each function it appears in.)
save.c:2133: error: `dp' undeclared (first use in this function)
save.c:2139: warning: implicit declaration of function `opendir'
save.c:2147: warning: implicit declaration of function `readdir'
save.c:2147: warning: assignment makes pointer from integer without a cast
save.c:2149: error: dereferencing pointer to incomplete type
save.c:2151: error: dereferencing pointer to incomplete type
save.c:2192: warning: implicit declaration of function `closedir'
save.c: In function `load_storerooms':
save.c:2199: error: `DIR' undeclared (first use in this function)
save.c:2199: error: `dp' undeclared (first use in this function)
save.c:2214: warning: assignment makes pointer from integer without a cast
save.c:2216: error: dereferencing pointer to incomplete type
save.c:2223: error: dereferencing pointer to incomplete type
save.c:2231: error: dereferencing pointer to incomplete type
save.c:2268: error: dereferencing pointer to incomplete type
save.c:2281: error: dereferencing pointer to incomplete type
save.c: In function `load_vendors':
save.c:2347: error: `DIR' undeclared (first use in this function)
save.c:2347: error: `dp' undeclared (first use in this function)
save.c:2362: warning: assignment makes pointer from integer without a cast
save.c:2364: error: dereferencing pointer to incomplete type
save.c:2366: error: dereferencing pointer to incomplete type
make[1]: *** [save.o] Error 1
make[1]: Leaving directory `/home/admin/releaserip/src'
make: *** [all] Error 2
$

void load_corpses( void )
{
DIR *dp;// line 2133
struct direct *de;
extern FILE *fpArea;
extern char strArea[MAX_INPUT_LENGTH];
extern int falling;

if ( !(dp = opendir(CORPSE_DIR)) )// line 2139
{
bug( "Load_corpses: can't open CORPSE_DIR", 0);
perror(CORPSE_DIR);
return;
}

falling = 1; /* Arbitrary, must be >0 though. */
while ( (de = readdir(dp)) != NULL )// line2147
{
if ( de->d_name[0] != '.' )// line 2149
{
sprintf(strArea, "%s%s", CORPSE_DIR, de->d_name );//2151
fprintf(stderr, "Corpse -> %s\n", strArea);
if ( !(fpArea = fopen(strArea, "r")) )
{
perror(strArea);
continue;
}
for ( ; ; )
{
char letter;
char *word;

letter = fread_letter( fpArea );
if ( letter == '*' )
{
fread_to_eol(fpArea);
continue;
}
if ( letter != '#' )
{
bug( "Load_corpses: # not found.", 0 );
break;
}
word = fread_word( fpArea );
if ( !str_cmp(word, "CORPSE" ) )
fread_obj( NULL, fpArea, OS_CORPSE );
else if ( !str_cmp(word, "OBJECT" ) )
fread_obj( NULL, fpArea, OS_CARRY );
else if ( !str_cmp( word, "END" ) )
break;
else
{
bug( "Load_corpses: bad section.", 0 );
break;
}
}
fclose(fpArea);
}
}
fpArea = NULL;
strcpy(strArea, "$");
closedir(dp);//2192
falling = 0;
return;
}

the other functions are just like this.. i have no idea what this means and i only messed with an include any ideas?

at the top of this file and on fight.c i had an error that sys/dir.h was missing.. i ran a search for dir.h in cygwin and found one in "usr/include/mingw/" but all it said was that it was obsoleate and to use io.h instead.. so i changed the includes to io.h istead and it compiled fine it it got here, dose this have anything do do with my problem?

source is for SWRiP codebase, it was labled FUSS.. as soon as i get it to work in cygwin il zip it up for others to download/use
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #3 on Wed 12 May 2004 09:49 AM (UTC)
Message
The old SMAUG code uses very platform-dependent directory handling code; I think this was fixed later.

Where is your codebase available for download? I'd like to try it out on my Cygwin installation, which I know is complete, to make sure that's alright on your side.

For your makefile, try this:

make > make_log.txt 2>&1

That is also redirecting output "channel" 2 (std. error I believe) to "channel" 1 (std. out); make must be printing errors to std.err., not std.out.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Jobey5000   (13 posts)  [Biography] bio
Date Reply #4 on Wed 12 May 2004 10:11 AM (UTC)

Amended on Wed 12 May 2004 10:17 AM (UTC) by Jobey5000

Message
its availible for download at swrip.betterbox.net

its on the information page i believe.. a few things ive found and fixxed so far....

in act_wiz.com you must find and replace all "trunc" with "trunc1" becase of math.h

i found a post by Nick saying to comment out #include <sys/dir.h> in fight.c and in save.c to replace <sys/dir.h> with <dirent.h> and to change any "struct direct" to "struct dirent"

his post is at http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1237

i did this and now my error are down to 2 im looking into now..

thanks for your help.

$ make
make swrip
make[1]: Entering directory `/home/admin/releaserip/src'
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS fight.c
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS save.c
save.c: In function `load_corpses':
save.c:2147: warning: assignment from incompatible pointer type
save.c:2149: error: dereferencing pointer to incomplete type
save.c:2151: error: dereferencing pointer to incomplete type
make[1]: *** [save.o] Error 1
make[1]: Leaving directory `/home/admin/releaserip/src'
make: *** [all] Error 2
$
[Go to top] top

Posted by Jobey5000   (13 posts)  [Biography] bio
Date Reply #5 on Wed 12 May 2004 10:21 AM (UTC)
Message
i did this and it got past save.c all the way to ships.c witch again has <sys/dir.h> missing.. shouldent be long now..
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #6 on Wed 12 May 2004 10:41 AM (UTC)
Message
I got it to compile just fine by changing to dirent.h, changing direct to dirent, and by defining NOCRYPT.

However, if you are going to release this publicly, you should not use 'trunc1' - rather, rename the function properly to 'truncate', because that is what it's doing.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Darrik Vequir   (24 posts)  [Biography] bio
Date Reply #7 on Wed 26 May 2004 05:01 PM (UTC)
Message

Hi all,

If you could do me a favor and tell me what you changed on RiP to make it cgywin compatible, I would greatly appreciate it. I'd like to add these changes into the release, if you folks don't mind.

Thank you,

Darrik Vequir
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #8 on Wed 26 May 2004 07:01 PM (UTC)

Amended on Wed 26 May 2004 07:02 PM (UTC) by David Haley

Message
Quoting myself :-)
Quote:
I got it to compile just fine by changing to dirent.h, changing direct to dirent, and by defining NOCRYPT.

However, if you are going to release this publicly, you should not use 'trunc1' - rather, rename the function properly to 'truncate', because that is what it's doing.


The changes I made are explained in more detail by Nick in the following post, I believe:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1237

(amendment) Basically it was as simple as compiling it, and fixing the errors it gave, which were related to trunc, crypt or directories. I didn't dare compile it with g++, though, because it's not something I'm doing for myself. I would strongly suggest compiling your code with g++ and making it error free and if possible, warning free. You'd be surprised how many errors can be caught with a stricter compile.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Darrik Vequir   (24 posts)  [Biography] bio
Date Reply #9 on Thu 27 May 2004 02:52 PM (UTC)
Message

Yeah, the first compiler for the first release of RiP I used was very loose... one of the 'bugs' in v1.0.0 was something that compiled fine on my server, but flipped out on others... v1.0.1 used a far more strict gcc compile... I should play around with g++ and see what happens.

Thanks for the help,

Darrik Vequir
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #10 on Thu 27 May 2004 04:51 PM (UTC)
Message
The problem with g++ is that it might go into C++ mode and start complaining about variables that it's recognizing as C++ keywords... for instance you'll have to change new to New. I'd still suggest you do it if you know what you're doing, however. It's just a little daunting for new coders (which I gather you're not... :P)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[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.


24,804 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]