Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2004, 11:50 AM
kate
Fire Beetle
 
Join Date: Nov 2002
Posts: 10
Default Linux Compile eoors on lasest CVS (11-05-2004)

I just got the lastest CVS snapshot a few minutes ago and it will not build.

First of all I would like to point out that in the makefiles, the CFLAG -Wstrict-prototypes is not a vailed flag when compiling C++ code, only C or ObjC. Anyway, that's just an anoying warning I get when building.

Anyways, the real errors I get are as follows.

EMuShareMem
Code:
In file included from ../zone/client.h:38,
                 from ../zone/masterentity.h:6,
                 from Spells.cpp:13:
../zone/../common/Item.h:258: error: `sint16 Inventory::_PutItem(sint16, ItemInst*)' is protected
../zone/../common/Item.h:448: error: within this context
../zone/../common/Item.h:261: error: `sint16 Inventory::_HasItem(std::map<sint16, ItemInst*, std::less<sint16>, std::allocator<std::pair<const sint16, ItemInst*> > >&, const Item_Struct*, uint8)' is protected
../zone/../common/Item.h:509: error: within this context
../zone/../common/Item.h:263: error: `sint16 Inventory::_HasItemByUse(std::map<sint16, ItemInst*, std::less<sint16>, std::allocator<std::pair<const sint16, ItemInst*> > >&, uint8, uint8)' is protected
../zone/../common/Item.h:511: error: within this context
../zone/../common/Item.h:258: error: `sint16 Inventory::_PutItem(sint16, ItemInst*)' is protected
../zone/../common/Item.h:518: error: within this context
make: *** [Spells.o] Error 1
and in the common code for World and Zone
Code:
../common/EQNetwork.cpp: In function `type HI_LOSWAPlong(type)':
../common/EQNetwork.cpp:73: error: `a' undeclared (first use this function)
../common/EQNetwork.cpp:73: error: (Each undeclared identifier is reported only once for each function it appears in.)
../common/EQNetwork.cpp:73: error: no matching function for call to `LO_WORD(<type error>)'
../common/EQNetwork.cpp:73: error: there are no arguments to `HIWORD' that depend on a template parameter, so a declaration of `HIWORD' must be available
../common/EQNetwork.cpp:73: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make: *** [../common/EQNetwork.o] Error 1
And for thoese of you whoo want to know:
gcc (GCC) 3.4.2 20041025 (Gentoo Hardened Linux 3.4.2-r3, ssp-3.4.1-1, pie-8.7.6.5)


Hope this helps someone.
Reply With Quote
  #2  
Old 11-15-2004, 03:39 AM
ellF
Fire Beetle
 
Join Date: Nov 2004
Location: Rochester, NY
Posts: 1
Default Dirty Solutions

I'm struggling with the same errors. Here's what I've found:

1. common/Item.h declares _GetItem(), _PutItem(), and _HasItem() as protected member functions on and around line 243. Commenting out the protected keyword makes them public, which eliminates this error, but it's probably not what should be done. I'm not certain why that error is being thrown -- I'm only a mediocre coder.

2. You can get by the type error by adding -fpermissive to the compiler options in the makefile. I imagine that we gentoo users have more recent versions of gcc than the developers are using for eqemu, and we're running into this error because (as the error message indicates) using an undeclared name has been deprecated.

Hope that helps!

EDIT: An additonal tip for getting this compiled with gcc-3.4: in common/EQNetwork.cpp, on line 73, change
Code:
HI_LOSWAPlong (type x)
to
Code:
HI_LOSWAPlong (type a)
EDIT: zone/MobAI.cpp makes three calls to abs() without explicitly casting the passed value as an int. This version of gcc, at least, complains of ambiguity. Explicitly casting the values resolves the error. In zone/MobAI.cpp, starting on line 238, change
Code:
 if(   ( abs(mob->GetX() - sender->GetX() ) > iArrgoRange)
			   || ( abs (mob->GetY() - sender->GetY() ) > iArrgoRange)
			   || ( abs (mob->GetZ() - sender->GetZ() ) > iArrgoRange)
to
Code:
 if(   ( abs ((int)(mob->GetX() - sender->GetX() )) > iArrgoRange)
			   || ( abs ((int)(mob->GetY() - sender->GetY() )) > iArrgoRange)
			   || ( abs ((int)(mob->GetZ() - sender->GetZ() )) > iArrgoRange)
EDIT: OK, I'm starting to think that I should make a separate thread. Anyways, I found that loading the EMuShareMem library would cause a segmentation fault on my machine, which seems to be a known problem with systems running the 2.6 kernel. The problem was solved http://www.eqemulator.net/forums/vie...entation+fault here -- you need to edit MMF.cpp and remove all occurances of the string "IPC_NOWAIT", then recompile the library.
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 06:15 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3