Compiling Problems do not want to end
Hi all,
i have a big big problem. Since 1 and a half week it try to find a way to get my files compiled. Alot of ppl already gave me some advice but still not able to fix my stuff. I will paste my errors here so you can help me, if you can and want. EMuShareMem Compile: >>>make clean rm -f MMFMutex.o Doors.o Items.o Spells.o NPCFactionLists.o MMF.o Loot.o ../common/timer.o ../common/unix.o ../common/EMuShareMem.o libEMuShareMem.so<<< so far so good >>>make gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DSHAREMEM -DCATCH_CRASH -DEMUSHAREMEM -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX `mysql_config --cflags` -c MMFMutex.cpp -o MMFMutex.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DSHAREMEM -DCATCH_CRASH -DEMUSHAREMEM -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX `mysql_config --cflags` -c Doors.cpp -o Doors.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DSHAREMEM -DCATCH_CRASH -DEMUSHAREMEM -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX `mysql_config --cflags` -c Items.cpp -o Items.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DSHAREMEM -DCATCH_CRASH -DEMUSHAREMEM -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX `mysql_config --cflags` -c Spells.cpp -o Spells.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ In file included from ../zone/client.h:38, from ../zone/masterentity.h:6, from Spells.cpp:13: ../zone/../common/Item.h:261: error: `sint16 Inventory::_PutItem(sint16, ItemInst*)' is protected ../zone/../common/Item.h:453: error: within this context ../zone/../common/Item.h:264: 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:514: error: within this context ../zone/../common/Item.h:266: 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:516: error: within this context ../zone/../common/Item.h:261: error: `sint16 Inventory::_PutItem(sint16, ItemInst*)' is protected ../zone/../common/Item.h:523: error: within this context make: *** [Spells.o] Error 1 >>> BIG PROBLEM Zone Compile: <<<make gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wno-deprecated -Wcomment -Wcast-align -O2 -ggdb -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS `mysql_config --cflags` ../common/EQNetwork.cpp -o ../common/EQNetwork.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ ../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>>> World COMPILE: <<<gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wcomment -Wcast-align -Winline -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD -DDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -DFIELD_ITEMS -I/usr/include/mysql -I/usr/mysql/include ../common/EQNetwork.cpp -o ../common/EQNetwork.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ ../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>>> Ok whats wrong with it? Please help me ) |
The first part of that is fairly straightforward. Use your favorite editor (VIM all the way... down with EMacs!) to edit ./source/common/Item.cpp, and change line 271 to public instead of protected. (I haven't found any problems with doing it this way, if it's going to mess things up, the devs are sure to let me know)
As for the Network.cpp problems, the stem from an incorrect declaration statement. Again, use your favorite VIM on ./source/common/EQNetwork.cpp, and change the first part of line 80 to be "a" instead of "x" Code:
type HI_LOSWAPlong (type a) ... Hope it helps. |
)
Thx for trying to help me.
but looks like that it create more errors. i check again later if i made a mistake. Loser |
It's not that it created more errors, it's that it allowed errors further in the code to be displayed. Compiling an object is a sequential event, if it can not proceed beyond Point A, that is all you will see. As soon as Point A is good, it can reach Point B, and so on.
I had quite a few innumerable errors with the CVS pull of the source that I got, the only ones I had a hard time getting fixed up were with EQNetwork.cpp. I hope your luck is better than mine. |
(
just kill me )
Hey i think you have some ideas ... are u in IRC? |
Nope. I primarily just dabble here and there. I'm actually just as lost as the next guy. However, I've been programming for roughly 12 years, but just starting to get a hold of C/C++, so I can figure some things out at this point.
|
Quote:
|
What version of gcc? I've heard reports of problems with gcc 4.
gcc --version will tell you. |
gcc
Hi Doodman,
well my gcc is 3.4.3. 2050227 |
I'm running gcc 4.0.0, and had TONS error call-outs following correction of the x -> a in EQNetwork.cpp
I was fairly certain that it was a 4.0.0 issue however, since that is the only thing I could find. |
I'm not sure yet if it will make a difference, but the GNU team released gcc 4.0.1 yesterday.
|
All times are GMT -4. The time now is 05:45 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.