Raised This Month: $51 Target: $400
 12% 

Compiling for Linux with Cygwin


Post New Thread Reply   
 
Thread Tools Display Modes
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-15-2009 , 13:33   Re: Compiling for Linux with Cygwin
Reply With Quote #11

Hey.
That looks very good now
The only error that comes that the path is wrong.
Which packet do I have to install to compile?

EDIT: I've know installed the "gpp" packet.
Now the line looks:
Code:
CPP = gpp
Here are the errors: http://pastebin.com/ma91da15

~ Chris

Last edited by Chrisber; 07-15-2009 at 13:38.
Chrisber is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 07-15-2009 , 13:40   Re: Compiling for Linux with Cygwin
Reply With Quote #12

try just changing the gpp to cpp

That should have been installed as well for base development work.
Keeper is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-15-2009 , 16:41   Re: Compiling for Linux with Cygwin
Reply With Quote #13

Hi.
Does not work, it says the following:
Quote:
cpp: "-c" is not a valid option to the preprocessor
Here's the complete log: http://pastebin.com/d41ca6bc7

EDIT: Now I'm using gcc, and it works!
But now it throws a lot of errors, more than 500 I think. I don't know why the compiler does that o_O

EDIT2: Deleted.

EDIT3: Here's my new Makefile including all Python Headers and Libs, but every file in Python/ is throwing a lot of errors.
http://pastebin.com/d4aef9b14

~ Chris

Last edited by Chrisber; 07-15-2009 at 18:10.
Chrisber is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 07-15-2009 , 19:33   Re: Compiling for Linux with Cygwin
Reply With Quote #14

Ooops, I meant gcc glad you got that to work. Can you post the errors?
Keeper is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-15-2009 , 21:05   Re: Compiling for Linux with Cygwin
Reply With Quote #15

That are THOUSANDS of errors and warnings. There are so many that the terminal is full until the top -.-
I think it's an error of finding the files.
Maybe you can check the include directories.

~ Chris
Chrisber is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-24-2009 , 22:53   Re: Compiling for Linux with Cygwin
Reply With Quote #16

Hey guys.
I tried it again now, here's my current Makefile: http://pastebin.com/d6d8a3679
And here's the output: http://pastebin.com/d6d9846ca
I really don't know what I can do anymore :S
That shouldn't be a MM:S compile currently, my plugin compiles for MM:S if I uncomment the following line in Source/NativeTools.cpp:
Code:
//define MMCOMP 1
~ Chris
Chrisber is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 07-25-2009 , 05:43   Re: Compiling for Linux with Cygwin
Reply With Quote #17

Uhm.
Maybe try changing
Code:
$(BIN_DIR)/%.o: %.cpp
to
Code:
%.o: %.cpp
__________________
hello, i am pm
PM is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-25-2009 , 09:12   Re: Compiling for Linux with Cygwin
Reply With Quote #18

Hi,
that helped a lot
Now it compiles, thank you
But there is an error (not warning) from the vector utility from VALVe:
Code:
In file included from /home/christian/nativetools/SDK/public/vmatrix.h:36,
                 from /home/christian/nativetools/SDK/dlls/cbase.h:41,
                 from Source/Headers/NativeTools.hpp:40,
                 from Source/NativeTools.cpp:1:
/home/christian/nativetools/SDK/public/vector4d.h:160: warning: ISO C++ forbids declaration of ‘__m128’ with no type
/home/christian/nativetools/SDK/public/vector4d.h:160: error: expected ‘;’ before ‘&’ token
/home/christian/nativetools/SDK/public/vector4d.h:161: error: expected `;' before ‘const’
/home/christian/nativetools/SDK/public/vector4d.h:161: warning: ISO C++ forbids declaration of ‘__m128’ with no type
/home/christian/nativetools/SDK/public/vector4d.h:161: error: expected ‘;’ before ‘&’ token
/home/christian/nativetools/SDK/public/vector4d.h:163: error: expected `;' before ‘private’
/home/christian/nativetools/SDK/public/vector4d.h: In member function ‘void Vector4DAligned::InitZero()’:
/home/christian/nativetools/SDK/public/vector4d.h:632: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
/home/christian/nativetools/SDK/public/vector4d.h:632: error: ‘_mm_set1_ps’ was not declared in this scope
/home/christian/nativetools/SDK/public/vector4d.h: In function ‘void Vector4DWeightMADSSE(vec_t, const Vector4DAligned&, Vector4DAligned&, const Vector4DAligned&, Vector4DAligned&)’:
/home/christian/nativetools/SDK/public/vector4d.h:663: error: ‘__m128’ was not declared in this scope
/home/christian/nativetools/SDK/public/vector4d.h:663: error: expected `;' before ‘packed’
/home/christian/nativetools/SDK/public/vector4d.h:666: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
/home/christian/nativetools/SDK/public/vector4d.h:666: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
/home/christian/nativetools/SDK/public/vector4d.h:666: error: ‘const class Vector4DAligned’ has no member named ‘AsM128’
/home/christian/nativetools/SDK/public/vector4d.h:666: error: ‘packed’ was not declared in this scope
/home/christian/nativetools/SDK/public/vector4d.h:666: error: ‘_mm_mul_ps’ was not declared in this scope
/home/christian/nativetools/SDK/public/vector4d.h:666: error: ‘_mm_add_ps’ was not declared in this scope
/home/christian/nativetools/SDK/public/vector4d.h:667: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
/home/christian/nativetools/SDK/public/vector4d.h:667: error: ‘class Vector4DAligned’ has no member named ‘AsM128’
/home/christian/nativetools/SDK/public/vector4d.h:667: error: ‘const class Vector4DAligned’ has no member named ‘AsM128’
Thanks!

~ Chris
Chrisber is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 07-25-2009 , 09:36   Re: Compiling for Linux with Cygwin
Reply With Quote #19

My first (and only) thought is that you might need to add -msse and -msse2 to your CFLAGS.
__________________
hello, i am pm
PM is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-25-2009 , 13:10   Re: Compiling for Linux with Cygwin
Reply With Quote #20

Wow - that worked
Now there are some errors, I list them here - I don't know why they are throwed?!
Code:
/home/christian/nativetools/SDK/public/tier0/platform.h:25:17: error: new.h: Datei oder Verzeichnis nicht gefunden

/home/christian/nativetools/SDK/public/mathlib/math_base.h:550: error: explicit template specialization cannot have a storage class

/home/christian/nativetools/SDK/game_shared/IEffects.h:23: error: use of enum ‘ShakeCommand_t’ without previous declaration
And there are a lot - and I mean at least more than 100 hundred - warnings from files in the SDK - is that normal?

EDIT: Fixed that now
But if I fix the error in math_base.h then the following appears on every file that I've included as cpp:
Code:
Release/Source/ConCommand.o: In function `QAngle Lerp<QAngle>(float, QAngle const&, QAngle const&)':
ConCommand.cpp:(.text+0x840): multiple definition of `QAngle Lerp<QAngle>(float, QAngle const&, QAngle const&)'
Release/Source/NativeTools.o:NativeTools.cpp:(.text+0x1d70): first defined here
What the ***?! I don't use that Lerp function anywhere oO

EDIT2: Got that! Just removed that function and now it works.
I thank you all
~ Chris

Last edited by Chrisber; 07-25-2009 at 17:46.
Chrisber is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode