Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Linux Servers

Archive::Linux Servers Archive area for Linux Servers's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-21-2002, 01:54 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default WOOT ! World compiling with gcc 3.2.1

Im pumped, got it compiling..

Heres how I worked through it..

First, alot of the messages are warnings, so I filtered out the ones I didnt want to see by removing -Waggregate-returns from the makefile, and added -Wno-deprecated so I wouldnt have so much crap to look at..

At that point, the 1st issue.
packet_dump.cpp and packet_dump.h.

3.2 did not like the header file defining default arguments in the function prototype, then defining them again in the function call iteself in .cpp, so in packet_dump.h I changed this..

//void DumpPacketAscii(uchar* buf, int32 size, int32 cols=16, int32
void DumpPacketAscii(uchar* buf, int32 size, int32 cols, int32 skip);
//void DumpPacketHex(uchar* buf, int32 size, int32 cols=16, int32 s
void DumpPacketHex(uchar* buf, int32 size, int32 cols, int32 skip);


Ok, that gets us further.. Next are namespace problems..

ALL hex and dec calls need to be prefixed with std::

so in console.cpp and zoneserver.cpp, I added the namespaces to the beginning of those calls (maybe in packet too).

va functions missing.

Easy enough,
add
#include <stdarg.h> into the else section after the win32 ifdef
that way for linux, you'll get the extra include.
Put this in console.cpp and zoneserver.cpp.

I think that was it, world compiled !

Im at work , so I can test my new world binary out, but looking forward to trying it. Next will be zone, and I bet it will be alot tougher.

If it works properly tonght, I'll send my changes to image to get him to roll them into the code and then start working on zone.

The big confusion was coming from the million and one deprecated header messages (which I'll work on fixing also), and the aggregate return messages. Once those got filtered out, it really wasnt that hard to run the problems down.

Update: The problem child in zone appears to be packet_dump_file.cpp.
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #2  
Old 11-21-2002, 02:14 AM
neotokyo
Hill Giant
 
Join Date: Oct 2002
Posts: 118
Default

ANSI C++ requires you to define default values ONLY in the declaration and not in the definition of a function!!!!!

change that back trump, and remove the default value at the definition
Reply With Quote
  #3  
Old 11-21-2002, 02:17 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Glad someone knows the ANSI standards! I sure don't !

Thanks Neo!
Actually, going back, it looks like it was changed in 3.12 packet_dump.cpp, I was testing with 3.11.

Now Im at here in zone..

In file included from net.cpp:78:
../common/unix.h:32:7: warning: no newline at end of file
net.cpp: In function `void LoadSPDat()':
net.cpp:369: `nocreate' is not a member of type `std::basic_ios<char, std::char
traits<char> >'
net.cpp:369: `openprot' is not a member of type `std::basic_filebuf<char, std::
har_traits<char> >'
make: *** [net.o] Error 1
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #4  
Old 11-21-2002, 03:22 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Ahhh...

ANSI finalized the C++ standard and decided that iostreams should not have a nocreate flag since it is platform dependent. Therefore the use of it is either non-existent or not dependable.

Heres from gcc.org
there is no ios::nocreate/ios::noreplace in ISO 14882
I have seen ios::nocreate being used for input-streams, most probably because the author thought it would be more correct to specify nocreate "explicitly". So you can simply leave it out for input-streams.

For output streams, "nocreate" is probably the default, unless you specify std::ios::trunc ? To be safe, you can open the file for reading, check if it has been opened, and then decide whether you want to create/replace or not. To my knowledge, even older implementations support app, ate and trunc (except for app ?).
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:12 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3