log0 wrote:phoenixstorm introduced CLIENT and SERVER defines some time ago, linux build scripts need to be updated.
pheonixstorm wrote:Actually just CLIENT, SERVER seems to introduce bugs in the server compile so have to figure something else out on that side.. but yeah, CLIENT is a must to keep some things out of the server code such as the new sound code klauss introduced. It was originally supposed to be windows only but now it will need to be for all OSes
--- trunk/vegastrike/src/gfx/cockpit_generic.cpp 2012/07/16 03:50:55 13388
+++ trunk/vegastrike/src/gfx/cockpit_generic.cpp 2012/11/28 03:28:34 13452
@@ -957,6 +957,7 @@
return name;
}
+#ifdef CLIENT
SoundContainer* Cockpit::GetSoundForEvent(Cockpit::EVENTID eventId) const
{
if (eventId < sounds.size())
@@ -976,3 +977,4 @@
{
return new SoundContainer(specs);
}
+#endif
--- trunk/vegastrike/src/gfx/cockpit_generic.h 2012/07/16 03:50:55 13388
+++ trunk/vegastrike/src/gfx/cockpit_generic.h 2012/11/28 03:28:34 13452
@@ -35,7 +35,8 @@
class Cockpit
{
public:
- ///cockpit events
+ ///cockpit events. Not needed in server
+#ifdef CLIENT
enum EVENTID {
EVENTID_FIRST,
@@ -114,7 +115,8 @@
/// Just after all valid values
NUM_EVENTS
};
-
+#endif
+
protected:
///style of current view (chase cam, inside)
enum VIEWSTYLE view;
@@ -336,6 +338,7 @@
virtual void SetCommAnimation( Animation *ani, Unit *un ) {}
virtual void SetStaticAnimation() {}
+#ifdef CLIENT
/**
* Retrieves the sound associated to the given event.
* Returns NULL if no sound has been associated
@@ -347,7 +350,8 @@
* (the actual container will be a different, implementation-specific one)
*/
void SetSoundForEvent(EVENTID eventId, const SoundContainer &soundSpecs);
-
+#endif
+
class SaveGame*savegame;
///Accesses the current navigationsystem
@@ -400,10 +404,12 @@
virtual void OnDockEnd(Unit *, Unit *) {}
virtual void OnJumpBegin(Unit *) {}
virtual void OnJumpEnd(Unit *) {}
-
+
+#ifdef CLIENT
protected:
/// Override to use a specific kind of sound implementation
virtual SoundContainer* soundImpl(const SoundContainer &specs);
+#endif
};
#endif
pheonixstorm wrote:Before my defines I was getting linker errors over soundcontainer if that helps.
pheonixstorm wrote:Thats why I decided to use the ifdef. The server code doesn't need sound event while the client does. Though I wrongly assumed that the CLIENT define from my earlier win32 code would have also been used for all OSes. I can add the required files into the win32 build but I don't see any real need for it to be there on any build since the server does use sound events. Same for a lot of things. Doesn't need to render anything or use any shaders.. no need for sound, though it may need mesh code if it does any collision testing (and it has access to a collision mesh).
pheonixstorm wrote:So no real easy fix unless we wrap it up in a win32 ifdef followed by client to keep linux/osx safe, but whats the point... Well, time to find what out of that file is actually used or needed for the server in those files.
Return to Compiling Problems [paste config.log]
Users browsing this forum: No registered users and 1 guest