Index: /code/branches/libraries/src/orxonox/gamestates/CMakeLists.txt
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/CMakeLists.txt	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/CMakeLists.txt	(revision 5638)
@@ -1,3 +1,3 @@
-ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+SET_SOURCE_FILES(GAMESTATES_SRC_FILES
   GSClient.cc
   GSDedicated.cc
@@ -10,2 +10,11 @@
   GSStandalone.cc
 )
+
+ORXONOX_ADD_LIBRARY(gamestates
+  PLUGIN
+  DEFINE_SYMBOL
+    "GAMESTATES_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${GAMESTATES_SRC_FILES}
+)
Index: /code/branches/libraries/src/orxonox/gamestates/GSClient.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSClient.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSClient.h	(revision 5638)
@@ -30,5 +30,5 @@
 #define _GSClient_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 
 #include "core/GameState.h"
@@ -37,5 +37,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport GSClient : public GameState
+    class _GamestatesExport GSClient : public GameState
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GSDedicated.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSDedicated.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSDedicated.h	(revision 5638)
@@ -30,5 +30,5 @@
 #define _GSDedicated_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 
 #include "core/GameState.h"
@@ -44,6 +44,6 @@
 namespace orxonox
 {
-    
-    class _OrxonoxExport GSDedicated : public GameState
+
+    class _GamestatesExport GSDedicated : public GameState
     {
     public:
@@ -61,10 +61,10 @@
         void setTerminalMode();
         static void resetTerminalMode();
-        
+
         void insertCharacter( unsigned int position, char c );
         void deleteCharacter( unsigned int position );
-        
+
         Server*                 server_;
-        
+
         boost::thread           *inputThread_;
         boost::recursive_mutex  inputLineMutex_;
@@ -76,5 +76,5 @@
         std::queue<std::string> commandQueue_;
         static termios*         originalTerminalSettings_;
-        
+
         unsigned int            cursorX_;
         unsigned int            cursorY_;
Index: /code/branches/libraries/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSGraphics.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSGraphics.h	(revision 5638)
@@ -36,5 +36,5 @@
 #define _GSGraphics_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 #include "core/GameState.h"
 
@@ -47,5 +47,5 @@
         This game state is only left out if we start a dedicated server where no graphics are present.
     */
-    class _OrxonoxExport GSGraphics : public GameState
+    class _GamestatesExport GSGraphics : public GameState
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GSIOConsole.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSIOConsole.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSIOConsole.h	(revision 5638)
@@ -30,10 +30,10 @@
 #define _GSIOConsole_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 #include "core/GameState.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSIOConsole : public GameState
+    class _GamestatesExport GSIOConsole : public GameState
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GSLevel.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSLevel.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSLevel.h	(revision 5638)
@@ -30,5 +30,5 @@
 #define _GSLevel_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 
 #include <string>
@@ -38,5 +38,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport GSLevel : public GameState, public OrxonoxClass
+    class _GamestatesExport GSLevel : public GameState, public OrxonoxClass
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GSMainMenu.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSMainMenu.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSMainMenu.h	(revision 5638)
@@ -30,5 +30,5 @@
 #define _GSMainMenu_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 
 #include "util/OgreForwardRefs.h"
@@ -37,5 +37,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport GSMainMenu : public GameState
+    class _GamestatesExport GSMainMenu : public GameState
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GSRoot.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSRoot.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSRoot.h	(revision 5638)
@@ -30,10 +30,10 @@
 #define _GSRoot_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 #include "core/GameState.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSRoot : public GameState
+    class _GamestatesExport GSRoot : public GameState
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GSServer.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSServer.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSServer.h	(revision 5638)
@@ -30,5 +30,5 @@
 #define _GSServer_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 
 #include "core/GameState.h"
@@ -37,5 +37,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport GSServer : public GameState
+    class _GamestatesExport GSServer : public GameState
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GSStandalone.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GSStandalone.h	(revision 5637)
+++ /code/branches/libraries/src/orxonox/gamestates/GSStandalone.h	(revision 5638)
@@ -30,10 +30,10 @@
 #define _GSStandalone_H__
 
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
 #include "core/GameState.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSStandalone : public GameState
+    class _GamestatesExport GSStandalone : public GameState
     {
     public:
Index: /code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h
===================================================================
--- /code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h	(revision 5638)
+++ /code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h	(revision 5638)
@@ -0,0 +1,60 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _GamestatesPrereqs_H__
+#define _GamestatesPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef GAMESTATES_SHARED_BUILD
+#    define _GamestatesExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _GamestatesExport
+#    else
+#      define _GamestatesExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _GamestatesExport  __attribute__ ((visibility("default")))
+#else
+#  define _GamestatesExport
+#endif
+
+#endif /* _GamestatesPrereqs_H__ */
