Compilation error in svn 76268

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
fedorax
Star Pilot
Star Pilot
Posts: 5
Joined: Mon Nov 29, 2010 6:01 pm

Compilation error in svn 76268

Post 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 ).
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compilation error in svn 76268

Post by klauss »

Weird. I have FlyByKeyboard and it builds fine.

In which file do you see the definition of FlyKeyboard?
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
fedorax
Star Pilot
Star Pilot
Posts: 5
Joined: Mon Nov 29, 2010 6:01 pm

Re: Compilation error in svn 76268

Post 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
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compilation error in svn 76268

Post 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.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
fedorax
Star Pilot
Star Pilot
Posts: 5
Joined: Mon Nov 29, 2010 6:01 pm

Re: Compilation error in svn 76268

Post 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 ?
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: Compilation error in svn 76268

Post 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
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compilation error in svn 76268

Post by klauss »

CLoneWolf wrote:The game executable got compiled and runs fine.

HTH
Um... maybe I should make clean then.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compilation error in svn 76268

Post 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.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: Compilation error in svn 76268

Post by CLoneWolf »

Success confirmed for 13286 :)
fedorax
Star Pilot
Star Pilot
Posts: 5
Joined: Mon Nov 29, 2010 6:01 pm

Re: Compilation error in svn 76268

Post by fedorax »

New build work fine now. Thank's.
gilroy
Atmospheric Pilot
Atmospheric Pilot
Posts: 1
Joined: Sat Jun 08, 2013 12:09 pm

Re: Compilation error in svn 76268

Post by gilroy »

Hi every one and all the read the topic
Complete set of 70-331 braindumps exam questions and brain dump to provide complete knowledge so you will pass your Pass4sure 642-902 exam in first try. For more details visit EMC now University of Pennsylvania and Black River Technical College best wishes.
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Compilation error in svn 76268

Post by TBeholder »

Wait, why it's even FlyByKeyboard instead of internal maneuver functions?
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compilation error in svn 76268

Post by klauss »

Huh?
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Compilation error in svn 76268

Post 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"?
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compilation error in svn 76268

Post 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.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Post Reply