Index: /code/trunk/src/OrxonoxConfig.h.in
===================================================================
--- /code/trunk/src/OrxonoxConfig.h.in	(revision 8417)
+++ /code/trunk/src/OrxonoxConfig.h.in	(revision 8418)
@@ -109,4 +109,13 @@
 #endif
 
+#ifndef __UNIQUE_NUMBER__
+#  if defined(ORXONOX_COMPILER_GCC) && ORXONOX_COMP_VER >= 430
+#    define __UNIQUE_NUMBER__ __COUNTER__
+#  elif defined(ORXONOX_COMPILER_MSVC)
+#    define __UNIQUE_NUMBER__ __COUNTER__
+#  else
+#    define __UNIQUE_NUMBER__ __LINE__
+#  endif
+#endif
 
 /*---------------------------------
Index: /code/trunk/src/libraries/core/Game.h
===================================================================
--- /code/trunk/src/libraries/core/Game.h	(revision 8417)
+++ /code/trunk/src/libraries/core/Game.h	(revision 8418)
@@ -59,5 +59,5 @@
 */
 #define DeclareGameState(className, stateName, bIgnoreTickTime, bGraphicsMode) \
-    static bool BOOST_PP_CAT(bGameStateDummy_##className, __LINE__) = orxonox::Game::declareGameState<className>(#className, stateName, bIgnoreTickTime, bGraphicsMode)
+    static bool BOOST_PP_CAT(bGameStateDummy_##className, __UNIQUE_NUMBER__) = orxonox::Game::declareGameState<className>(#className, stateName, bIgnoreTickTime, bGraphicsMode)
 // tolua_begin
 namespace orxonox
Index: /code/trunk/src/libraries/core/ToluaInterface.h
===================================================================
--- /code/trunk/src/libraries/core/ToluaInterface.h	(revision 8417)
+++ /code/trunk/src/libraries/core/ToluaInterface.h	(revision 8418)
@@ -42,6 +42,6 @@
 // Macro for declaring a tolua interface of a library/module
 #define DeclareToluaInterface(libraryName) \
-    static bool BOOST_PP_CAT(bDummy##libraryName, __LINE__) = orxonox::LuaState::addToluaInterface(&tolua_##libraryName##_open, #libraryName); \
-    static Loki::ScopeGuardImpl1<bool (*)(const std::string&), std::string> BOOST_PP_CAT(dummy##libraryName, __LINE__)(&orxonox::LuaState::removeToluaInterface, #libraryName)
+    static bool BOOST_PP_CAT(bDummy##libraryName, __UNIQUE_NUMBER__) = orxonox::LuaState::addToluaInterface(&tolua_##libraryName##_open, #libraryName); \
+    static Loki::ScopeGuardImpl1<bool (*)(const std::string&), std::string> BOOST_PP_CAT(dummy##libraryName, __UNIQUE_NUMBER__)(&orxonox::LuaState::removeToluaInterface, #libraryName)
 
 #endif /* _ToluaInterface_H__ */
Index: /code/trunk/src/libraries/core/command/ConsoleCommand.h
===================================================================
--- /code/trunk/src/libraries/core/command/ConsoleCommand.h	(revision 8417)
+++ /code/trunk/src/libraries/core/command/ConsoleCommand.h	(revision 8418)
@@ -269,5 +269,5 @@
 /// Internal macro
 #define SetConsoleCommandGeneric(group, name, functor) \
-    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __LINE__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor)))
+    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor)))
 
 
@@ -304,5 +304,5 @@
 /// Internal macro
 #define DeclareConsoleCommandGeneric(group, name, functor) \
-    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __LINE__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor), false))
+    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor), false))
 
 
Index: /code/trunk/src/libraries/network/NetworkFunction.h
===================================================================
--- /code/trunk/src/libraries/network/NetworkFunction.h	(revision 8417)
+++ /code/trunk/src/libraries/network/NetworkFunction.h	(revision 8418)
@@ -255,7 +255,7 @@
 
 #define registerStaticNetworkFunction( functionPointer ) \
-  static void* BOOST_PP_CAT( NETWORK_FUNCTION_, __LINE__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer );
+  static void* BOOST_PP_CAT( NETWORK_FUNCTION_, __UNIQUE_NUMBER__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer );
 #define registerMemberNetworkFunction( class, function ) \
-  static void* BOOST_PP_CAT( NETWORK_FUNCTION_##class, __LINE__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function);
+  static void* BOOST_PP_CAT( NETWORK_FUNCTION_##class, __UNIQUE_NUMBER__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function);
   // call it with functionPointer, clientID, args
 #define callStaticNetworkFunction( functionPointer, ...) \
