Page 1 of 1
Compilation error in svn 76268
Posted: Mon Jan 02, 2012 3:05 am
by fedorax
At the end of compilation i get this error:
src/cmd/ai/autodocking.o: In function `Orders::AutoDocking::AbortState(Unit*, Unit*)':
autodocking.cpp:(.text+0x616): undefined reference to `FlyByKeyboard::StopKey(KBData const&, KBSTATE)'
collect2: ld returned 1 exit status
make[1]: *** [vegaserver] Erreur 1
make[1]: *** Attente des tâches non terminées....
make[1]: quittant le répertoire « /home_common/softs/jeux/VegaStrike/vegastrike »
make: *** [all] Erreur 2
That's come from line 172 in file autodocking.cpp
FlyByKeyboard::StopKey(kbdata, PRESS);
I Can't find file or reference to FlyByKeyboard. Replace it by FlyKeyboard::StopKey(kbdata, PRESS); give another error.
src/cmd/ai/autodocking.cpp: In member function ‘void Orders::AutoDocking::AbortState(Unit*, Unit*)’:
src/cmd/ai/autodocking.cpp:172: error: ‘FlyKeyboard’ has not been declared
make[1]: *** [src/cmd/ai/autodocking.o] Erreur 1
make[1]: quittant le répertoire « /home_common/softs/jeux/VegaStrike/vegastrike
Comment this line solve the error and the game seam's work fine. ( Executables files vegastrike et vssetup are created before this error happen ).
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 4:50 am
by klauss
Weird. I have FlyByKeyboard and it builds fine.
In which file do you see the definition of FlyKeyboard?
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 6:32 am
by fedorax
In which file do you see the definition of FlyKeyboard?
I just replace FlyByKeyboard by FlyKeyboard just for see if the error was here but it's not the case.
The only line wihch cause the problem is 172 in file autodocking.cpp all others work and i can find the class definition FlyByKeyboard in flykeyboard.h, the fonction
void FlyByKeyboard::StopKey( const KBData&, KBSTATE k )
Is present in filekeyboard.cpp but the call
`FlyByKeyboard::StopKey(KBData const&, KBSTATE)
Return an undefined refence message and i can't understand why. Older compilation ( 2 / 3 weeks ago ) was good, before recompile i do a make distclean and restart all the steps from boostrap-sh, configure, make etc.
My OS is debian squeeze LXDE
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 6:37 am
by klauss
fedorax wrote:Return an undefined refence message and i can't understand why. Older compilation ( 2 / 3 weeks ago ) was good, before recompile i do a make distclean and restart all the steps from boostrap-sh, configure, make etc.
My OS is debian squeeze LXDE
Did you try "make clean" and then "make"?
I cannot think of another culprit if the code seems right and it builds here.
Anyway, I'll have a debian available in a few days, so I'll try there when I can.
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 9:02 am
by fedorax
Code: Select all
Did you try "make clean" and then "make"?
Yes, as i say in my precedent post i recompile from scratch.
I just do an ultime test: I delete vegastrike directory and make a new upload of svn in case of update dont work properly:
svn co
https://vegastrike.svn.sourceforge.net/ ... vegastrike
./bootstrap-sh
./configure --enable-release ( Also try with a single ./configure )
make all
And got the same error. It's very weird. May be the message "undefined reference" don't reflect the real error ?
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 1:05 pm
by CLoneWolf
Debian SID here;
just pulled the current revision, 13285 (76268 was the external objects revision, which is now 76269)
issued a make clean before make
result for vegaserver:
Code: Select all
src/cmd/ai/autodocking.o: In function `Orders::AutoDocking::AbortState(Unit*, Unit*)':
autodocking.cpp:(.text+0x83c): undefined reference to `FlyByKeyboard::StopKey(KBData const&, KBSTATE)'
The game executable got compiled and runs fine.
HTH
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 6:15 pm
by klauss
CLoneWolf wrote:The game executable got compiled and runs fine.
HTH
Um... maybe
I should make clean then.
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 8:59 pm
by klauss
Ok, I just split flykeyboard, it wasn't being included in the server (probably because it uses keyboard input). So I split it in generic, server and client parts, as is done with several other client-specific classes.
It should build and run fine now.
Re: Compilation error in svn 76268
Posted: Mon Jan 02, 2012 10:25 pm
by CLoneWolf
Success confirmed for 13286
Re: Compilation error in svn 76268
Posted: Tue Jan 03, 2012 1:06 am
by fedorax
New build work fine now. Thank's.
Re: Compilation error in svn 76268
Posted: Sat Jun 08, 2013 1:17 pm
by gilroy
Hi every one and all the read the topic
Re: Compilation error in svn 76268
Posted: Sat Jun 08, 2013 1:35 pm
by TBeholder
Wait, why it's even FlyByKeyboard instead of internal maneuver functions?
Re: Compilation error in svn 76268
Posted: Sat Jun 08, 2013 8:24 pm
by klauss
Huh?
Re: Compilation error in svn 76268
Posted: Sun Jun 09, 2013 2:41 am
by TBeholder
It calls FlyByKeyboard::StopKey which sets key states and sets stoppress=true; when stoppress is set, FlyByKeyboard::Execute calls FlyByWire::Stop - unnecessarily convoluted, no?.. Instead of calling FlyByWire::Stop directly or what, "parent->GetComputerData().set_speed = 0"?
Re: Compilation error in svn 76268
Posted: Sun Jun 09, 2013 6:08 am
by klauss
Well, the code could be a lot more OO and tidily modular, but it's quite straightforward: Xpress is state for an edge detector, and the relevant AI methods are invoked on edge conditions. Some keys are edge triggered, some are level triggered, but it's always the same pattern, so not so convoluted once you recognize the pattern.