Renamed class VideoFile to VidFile, no problemo.
Added,
Code: Select all
#VEGASERVER_COMPILING added by chuck_starchaser, to switch between
# unit.cpp including unit.h, and unit.h including unit.cpp
vegaserver_CXXFLAGS = -D VEGASERVER_COMPILING
to Makefile.am, and did a horrible switcharoo:
At bottom of unit.h:
Code: Select all
//#include "unit.cpp" --chuck_starchaser commenting out the root of all evil
#ifdef VEGASERVER_COMPILING
#include "unit.cpp"
#endif
At top of unit.cpp:
Code: Select all
#ifdef VEGASERVER_COMPILING
#ifndef __UNIT_CPP__
#define __UNIT_CPP__
#endif
#else
#include "unit.h"
#endif
#ifndef __UNIT_CPP__
......
Added .h file style
Code: Select all
#ifndef __XXX_CPP__
#define __XXX_CPP__
..................
#endif
to the included .cpp files (which should really be named .h, as they only
have templates); and had them include unit.h, which they needed to.
Vegastrike compiles and links; vegaserver compiles but doesn't link, BUT the
linker errors are few and look specific:
Code: Select all
src/cmd/vegaserver-faction_xml.o: In function `Faction::beginElement(void*, char const*, char const**)':
faction_xml.cpp:(.text+0x10cf): undefined reference to `FactionUtil::createAnimation(char const*)'
faction_xml.cpp:(.text+0x141c): undefined reference to `FactionUtil::createAnimation(char const*)'
src/cmd/vegaserver-pilot.o: In function `Pilot::SetComm(Unit*)':
pilot.cpp:(.text+0x11): undefined reference to `FactionUtil::GetRandCommAnimation(int, Unit*, unsigned char&)'
src/cmd/vegaserver-pilot.o: In function `Pilot::getCommFace(Unit*, float, unsigned char&)':
pilot.cpp:(.text+0x3a): undefined reference to `FactionUtil::GetRandCommAnimation(int, Unit*, unsigned char&)'
src/gfx/vegaserver-mesh_bin.o: In function `Mesh::LoadBinary(char const*, int)':
mesh_bin.cpp:(.text+0xc4a): undefined reference to `FactionUtil::getForceLogo(int)'
mesh_bin.cpp:(.text+0x146b): undefined reference to `FactionUtil::getSquadLogo(int)'
src/gfx/vegaserver-halo_system.o: In function `DoParticles(QVector, float, Vector const&, float, float, int)':
halo_system.cpp:(.text+0x1221): undefined reference to `particleTrail'
halo_system.cpp:(.text+0x133a): undefined reference to `ParticleTrail::AddParticle(ParticlePoint const&, Vector const&, float)'
src/gfx/vegaserver-camera.o: In function `Camera::UpdateCameraSounds()':
camera.cpp:(.text+0x4fb): undefined reference to `AUDListener(QVector const&, Vector const&)'
camera.cpp:(.text+0x515): undefined reference to `AUDListenerOrientation(Vector const&, Vector const&, Vector const&)'
src/gfx/vegaserver-camera.o: In function `Camera::UpdateGFX(unsigned char, unsigned char, unsigned char, unsigned char, float, float)':
camera.cpp:(.text+0x57c): undefined reference to `PhysicsSystem::Update()'
camera.cpp:(.text+0x586): undefined reference to `GFXLoadIdentity(MATRIXMODE)'
camera.cpp:(.text+0x5f8): undefined reference to `GFXPerspective(float, float, float, float, float)'
camera.cpp:(.text+0x664): undefined reference to `GFXParallel(float, float, float, float, float, float)'
camera.cpp:(.text+0x742): undefined reference to `GFXLookAt(Vector, QVector, Vector)'
camera.cpp:(.text+0x74c): undefined reference to `GFXCalculateFrustum()'
src/gfx/vegaserver-camera.o: In function `Camera::Camera(Camera::ProjectionType)':
camera.cpp:(.text+0x848): undefined reference to `PhysicsSystem::PhysicsSystem(float, float, QVector*, Vector*, Vector*, Vector*)'
src/gfx/vegaserver-camera.o: In function `Camera::Camera(Camera::ProjectionType)':
camera.cpp:(.text+0xa8e): undefined reference to `PhysicsSystem::PhysicsSystem(float, float, QVector*, Vector*, Vector*, Vector*)'
src/gfx/vegaserver-camera.o: In function `Camera::RestoreViewPort(float, float)':
camera.cpp:(.text+0x481): undefined reference to `GFXSubwindow(float, float, float, float)'
src/gfx/vegaserver-camera.o: In function `Camera::GetView(Matrix&)':
camera.cpp:(.text+0x4c8): undefined reference to `GFXGetMatrixView(Matrix&)'
src/gfx/vegaserver-camera.o: In function `Camera::UpdateGFX(unsigned char, unsigned char, unsigned char, unsigned char, float, float)':
camera.cpp:(.text+0x780): undefined reference to `GFXSubwindow(float, float, float, float)'
collect2: ld returned 1 exit status
make: *** [vegaserver] Error 1
Looks as if vegaserver's make list needed to include faction, faction_util, physics and camera;
but I'm wary of adding modules that might cascade even more dependencies...
I'm also rather curious why vegaserver now refers to things it didn't refer to before...
Should I, perhaps, try removing pilot and faction_xml from the vegaserver link list,
instead of adding stuff? Not sure. It's time to go to bed, though.