What i need Libraries for C?

Posted by Magnefikko on Tue 01 Aug 2006 07:25 AM — 8 posts, 27,526 views.

Poland #0
I see during compilating MUD following error:

Kompilator: Default compiler
Building Makefile: "D:\magnefikko\Elvenbane\Makefile.win"
Wykonywanie make...
make.exe -f "D:\magnefikko\Elvenbane\Makefile.win" all
gcc.exe -c comm.c -o comm.o -I"C:/Dev-Cpp/include"

comm.c: In function `process_output':
comm.c:1024: error: `go_ahead_str' undeclared (first use in this function)
comm.c:1024: error: (Each undeclared identifier is reported only once
comm.c:1024: error: for each function it appears in.)

comm.c: At top level:
comm.c:1206: error: conflicting types for 'write_to_descriptor'
comm.c:859: error: previous implicit declaration of 'write_to_descriptor' was here

comm.c: In function `nanny':
comm.c:1260: warning: passing arg 1 of `strcmp' makes pointer from integer without a cast
comm.c:1267: error: `echo_on_str' undeclared (first use in this function)

comm.c:1515: error: `echo_off_str' undeclared (first use in this function)
comm.c:1582: warning: assignment makes pointer from integer without a cast
comm.c:1605: warning: passing arg 1 of `strcmp' makes pointer from integer without a cast

make.exe: *** [comm.o] Error 1

Wykonanie zakończone


Compilator see frist error here:
write_to_buffer( d, go_ahead_str, 0 );

I hawe Dev-C++ 4.9.9.2 and ZLIB1 libary.

What i need other libary? :-)


[I compilate miniMUD based by "Sword Quest".He is similar to
ROM]
Amended on Tue 01 Aug 2006 07:30 AM by Magnefikko
Australia Forum Administrator #1
These are not missing libraries, they are undeclared functions.
Poland #2
This is a errors in file "comm.c"

1024:write_to_buffer( d, go_ahead_str, 0 );

1206:{

1260:if ( strcmp( crypt( argument, ch->pcdata->pwd ), ch->pcdata->pwd ) )

1267:write_to_buffer( d, echo_on_str, 0 );

1515:write_to_buffer( d, echo_off_str, 0 );

1582:pwdnew = crypt( argument, ch->name );

1605:if ( strcmp( crypt( argument, ch->pcdata->pwd ), ch->pcdata->pwd ) )


I do not know well too C.Can adnybody help me? :-)
my comm.c in HTML: http://mayesticgame.w.interia.pl/files/comm_c.html
Amended on Tue 01 Aug 2006 10:06 AM by Magnefikko
USA #3
Those are telnet control strings. If you look at Nick's MXP snippet, available from this site, he defines those in one of the files; you would need to follow the snippet's instructions on how to add them.

Did you change anything in the code you have?
Poland #4
As yet, I changed nothing in code affectation Strings.
I tested to compile original code too completely but effects were the same.
Meybe i get you link? :-)

Sword Quest Role Playing by Robert L. Peckham.
Version 27.06.2006
http://celemir.net/~sq/SQ.oct.27.2003.tar.gz

Sometime I had similar problem and it advice change of compiler me.It good idea? :-)
USA #5
I'm sorry, I don't know what a "code affectation string" is.

The code compiled without any problems under Linux. I'll try Cygwin when I get home from work.

Did you look at the MXP snippet I mentioned? It has the control strings you need.
Poland #6
I hawe Windows XP.
I download a MXP snippet but add it to project (in Dev C++) but nothing hapiens.

Edit: Hmm...now my compilator see error here: #include "merc.h" .....
Amended on Tue 01 Aug 2006 06:15 PM by Magnefikko
USA #7
You're not supposed to "just add it", there are instructions to follow. Besides you aren't supposed to be adding MXP -- I told you that it has the control strings, not to add in the whole snippet. Let's go back to basics a little bit: do you understand the error message it's giving you?