PDA

View Full Version : Compiling 0.5.0 error


Elrach
07-16-2003, 02:37 PM
I'm getting the following error when I try to compile 0.5.0.

Parser::ParseCommands(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, unsigned int, Mob*, Mob*)':

I have a few of those, related to the use of the string datatype that was introduced into parser.cpp.

I've yet to find a solution, yet others have had similar problems in reports on the net.

I'm using g++ 3.2.2.

Trumpcard
07-16-2003, 03:48 PM
i havent even tried to compile it yet on linux, i'll let you know once i look into it....

Bigpull
07-16-2003, 04:36 PM
Thats not an error message so it's hard to say what went wrong. You may need to comment a function override, i didn't bother to investigate it i just wanted it to compile so i could get back to other stuff..

//char* itoa(int integer) {char tmp[10];return itoa(integer,tmp,10);}

Elrach
07-17-2003, 12:04 AM
Aye, you're right. I shouldn't have tried compiling when I was actually ready for bed. hehe, thanks.

mutombo
07-19-2003, 12:45 AM
anyone had already luck compiling it ?
i could only get the sharelib compiled.
i tried some different options in the makefile, but this doesnt help.

Bigpull
07-19-2003, 08:02 AM
Posting to a complie error post with out posting the compile error is semi pointless don't you think? If you can't detrmine the errors from the warnings post, post all of make's output.

mutombo
07-19-2003, 08:42 PM
sorry i thought there were perhaps some known issues with linux.
here my errors:
compiling world is now successful with gcc-3.2

compiling zone:
with fix from:
http://forums.eqemu.net/viewtopic.php?t=9532

client_process.cpp: In member function `bool
Client::FinishConnState2(DBAsyncWork*)':
client_process.cpp:5243: warning: comparison between signed and unsigned
integer expressions
client_process.cpp:5348:17: invalid preprocessing directive #DebugBreak
client_process.cpp: In member function `void Client::CompleteConnect()':
client_process.cpp:5546: warning: assignment to non-pointer type `char' from
NULL
client_process.cpp:5546: warning: argument to non-pointer type `char' from NULL
client_process.cpp: In member function `void Client::BulkSendInventoryItems()':
client_process.cpp:5909: warning: unused variable `const Item_Struct*item'
client_process.cpp: In member function `void
Client::BulkSendMerchantInventory(int, short unsigned int)':
client_process.cpp:6051: warning: comparison between signed and unsigned
integer expressions
client_process.cpp:6051: warning: comparison between signed and unsigned
integer expressions
client_process.cpp: In member function `void Client::OPMemorizeSpell(const
APPLAYER*)':
client_process.cpp:6210: warning: comparison between signed and unsigned
integer expressions
make: *** [client_process.o] Error 1



with gcc-2.95 it always stops here:

In file included from ../common/database.h:33,
from ../common/database.cpp:39:
../common/eq_packet_structs.h:102: anonymous class type not used to declare any objects
../common/database.cpp: In method `bool Database::CreateCharacter(unsigned int, PlayerProfile_Struct *, Inventory_Struct *)':

Bigpull
07-19-2003, 10:49 PM
client_process.cpp:5348:17: invalid preprocessing directive #DebugBreak

//This is a comment

#this is a preprocessor directive

=)

mutombo
07-20-2003, 09:41 AM
thx very much Bigpull, Im only a shelldude, not much knowledge with C.

but i still have some issues with parser.cpp:

.
.
.
parser.cpp: In function `char* fixstring(char*)':
parser.cpp:1301: warning: comparison between signed and unsigned integer
expressions
parser.cpp: In function `int DoCompare(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
parser.cpp:1317: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1317: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1321: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1321: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1325: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1325: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1329: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1329: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp: In member function `int
Parser::ParseCommands(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int, int, unsigned int, Mob*, Mob*)':
parser.cpp:1460: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1475: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1513: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
parser.cpp:1513: warning: cast from `const char*' to `char*' discards
qualifiers from pointer target type
make: *** [parser.o] Error 1


im already tried gcc-3.2 and 3.3 .
3.3 has issues with the crc32.cpp, but gcc-3.2 seems fine,exept these error above.

on a host with pure gcc 3.2 and glibc 2.2.5 i get the same error.

kathgar
07-20-2003, 10:38 AM
Those are all warning, they don't break compiles post the FULL compile message if you don't know what to look for

mutombo
07-20-2003, 10:44 AM
got it working with the fixes from here:
http://forums.eqemu.net/viewtopic.php?t=9493

thx to all helpers

krich
07-20-2003, 11:07 AM
OMG, there's more Linux people than I thought there were. :D

Cool. :mrgreen:

Regards,

krich