View Single Post
Author Message
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 10-13-2010 , 09:56   Compiling for Linux... SSE and MMX?
Reply With Quote #1

Hey,
I currently want to compile for Linux.
My idea was to install Code::Blocks (which works well) and then import my Visual Studio 2008 Projekt (which works aswell too).

But when I want to compile, there are some errors in the SDK:
Code:
/usr/lib/gcc/i486-linux-gnu/4.3.2/include/xmmintrin.h:35:3: error: #error "SSE instruction set not enabled"
In file included from /usr/include/c++/4.3/vector:66,
                 from test/includes.hpp:40,
                 from /home/chris/projects/test/blah.cpp:1:
/usr/include/c++/4.3/bits/stl_algobase.h:232:56: error: macro "min" passed 3 arguments, but takes just 2
/usr/include/c++/4.3/bits/stl_algobase.h:252:56: error: macro "max" passed 3 arguments, but takes just 2
In file included from SourceMM/core/sourcehook/sourcehook_impl.h:175,
                 from test/includes.hpp:6,
                 from /home/chris/projects/test/blah.cpp:1:
SourceMM/core/sourcehook/sourcehook_impl_cproto.h: In static member function ‘static unsigned int SourceHook::Impl::CProto::GetRealFlags(const SourceHook::PassInfo&)’:
SourceMM/core/sourcehook/sourcehook_impl_cproto.h:59: warning: enumeral and non-enumeral type in conditional expression
In file included from SDK/public/edict.h:14,
                 from SDK/public/engine/iserverplugin.h:16,
                 from test/includes.hpp:13,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/mathlib/vector.h: In copy constructor ‘VectorByValue::VectorByValue(const VectorByValue&)’:
SDK/public/mathlib/vector.h:333: warning: base class ‘class Vector’ should be explicitly initialized in the copy constructor
SDK/public/mathlib/vector.h: In copy constructor ‘QAngleByValue::QAngleByValue(const QAngleByValue&)’:
SDK/public/mathlib/vector.h:1802: warning: base class ‘class QAngle’ should be explicitly initialized in the copy constructor
In file included from SDK/public/tier1/utlvector.h:25,
                 from SDK/public/gametrace.h:15,
                 from SDK/public/cmodel.h:128,
                 from SDK/public/edict.h:15,
                 from SDK/public/engine/iserverplugin.h:16,
                 from test/includes.hpp:13,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/tier1/strtools.h: In function ‘int V_stricmp(const char*, const char*)’:
SDK/public/tier1/strtools.h:101: error: ‘stricmp’ was not declared in this scope
In file included from SDK/public/tier1/utlsymbol.h:17,
                 from SDK/public/filesystem.h:13,
                 from test/includes.hpp:14,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/tier1/utlrbtree.h: In function ‘bool CaselessStringLessThan(const char* const&, const char* const&)’:
SDK/public/tier1/utlrbtree.h:33: error: ‘stricmp’ was not declared in this scope
In file included from SDK/public/filesystem.h:13,
                 from test/includes.hpp:14,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/tier1/utlsymbol.h: At global scope:
SDK/public/tier1/utlsymbol.h:56: warning: type qualifiers ignored on function return type
In file included from test/includes.hpp:15,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/game/server/iplayerinfo.h:143: warning: type qualifiers ignored on function return type
SDK/public/game/server/iplayerinfo.h:145: warning: type qualifiers ignored on function return type
In file included from SDK/public/engine/IEngineTrace.h:17,
                 from test/includes.hpp:22,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/mathlib/vector4d.h:148: error: ISO C++ forbids declaration of ‘__m128’ with no type
SDK/public/mathlib/vector4d.h:148: error: ‘__m128’ declared as an ‘inline’ field
SDK/public/mathlib/vector4d.h:148: error: expected ‘;’ before ‘&’ token
SDK/public/mathlib/vector4d.h:149: error: expected `;' before ‘inline’
SDK/public/mathlib/vector4d.h:149: error: ISO C++ forbids declaration of ‘__m128’ with no type
SDK/public/mathlib/vector4d.h:149: error: ‘__m128’ declared as an ‘inline’ field
SDK/public/mathlib/vector4d.h:149: error: expected ‘;’ before ‘&’ token
SDK/public/mathlib/vector4d.h:151: error: expected `;' before ‘private’
SDK/public/mathlib/vector4d.h: In member function ‘void Vector4DAligned::InitZero()’:
SDK/public/mathlib/vector4d.h:622: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
SDK/public/mathlib/vector4d.h:622: error: ‘_mm_set1_ps’ was not declared in this scope
SDK/public/mathlib/vector4d.h: In function ‘void Vector4DWeightMADSSE(vec_t, const Vector4DAligned&, Vector4DAligned&, const Vector4DAligned&, Vector4DAligned&)’:
SDK/public/mathlib/vector4d.h:673: error: ‘__m128’ was not declared in this scope
SDK/public/mathlib/vector4d.h:673: error: expected `;' before ‘packed’
SDK/public/mathlib/vector4d.h:676: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
SDK/public/mathlib/vector4d.h:676: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
SDK/public/mathlib/vector4d.h:676: error: ‘const class Vector4DAligned’ has no member named ‘AsM128’
SDK/public/mathlib/vector4d.h:676: error: ‘packed’ was not declared in this scope
SDK/public/mathlib/vector4d.h:676: error: ‘_mm_mul_ps’ was not declared in this scope
SDK/public/mathlib/vector4d.h:676: error: ‘_mm_add_ps’ was not declared in this scope
SDK/public/mathlib/vector4d.h:677: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
SDK/public/mathlib/vector4d.h:677: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
SDK/public/mathlib/vector4d.h:677: error: ‘const class Vector4DAligned’ has no member named ‘AsM128’
In file included from test/includes.hpp:27,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/game/shared/IEffects.h: At global scope:
SDK/game/shared/IEffects.h:23: error: use of enum ‘ShakeCommand_t’ without previous declaration
In file included from SDK/public/SoundEmitterSystem/isoundemittersystembase.h:17,
                 from test/includes.hpp:29,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/mathlib/compressed_vector.h:528: warning: type qualifiers ignored on function return type
In file included from SDK/game/server/util.h:23,
                 from SDK/game/server/cbase.h:69,
                 from test/includes.hpp:32,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/public/server_class.h: In constructor ‘ServerClass::ServerClass(const char*, SendTable*)’:
SDK/public/server_class.h:47: error: ‘_stricmp’ was not declared in this scope
SDK/public/server_class.h:56: error: ‘_stricmp’ was not declared in this scope
In file included from SDK/game/server/cbase.h:69,
                 from test/includes.hpp:32,
                 from /home/chris/projects/test/blah.cpp:1:
SDK/game/server/util.h: In function ‘bool FStrEq(const char*, const char*)’:
SDK/game/server/util.h:176: error: ‘stricmp’ was not declared in this scope
I don't know why this appears :/
I use the reverse-engineered SDK from hg.alliedmods.net for orangebox-valve

GCC version is 4.3.2

Any ideas?

Thanks!
Chrisber is offline