| Compiling SPARK on Mac OS X | |
|
|
Author | Message |
---|
Luinecho Guest
| Subject: Compiling SPARK on Mac OS X Sun Jan 24, 2010 5:37 pm | |
| Hey, I want my project to be cross-plattform and release it for Windows, Linux and Mac. On Windows there are the precompiled libraries/.dlls I just can use, so I don't have to compile it by my own. I'm not using Linux right now, so I'll look after linux later. I got a MacBook, that's why I want to compile and test SPARK on Mac OS X.
I downloaded the full 1.04 SPARK-Project which has projects for VC++ 2005, 2008 and also Code::Blocks. Well, I opened the spark.workspace on Code::Blocks and want to build it now - but how do I have to do this? I have no knowledge in compiling libraries so I don't know where to begin. I can't just press 'compile' because the compiler says: SPARK (not to compile) does not support the current platform. Skipping... Nothing to be done.
Well, yeah, the Build Target is 'Release win32' which is not correct, but there is only debug win32 - no mac or linux. What do I have to do? Maybe someone else tried to compile SPARK on a mac and could help me (or the linux guys). I have no idea what to do and there are so many settings and configurations at code::Blocks - Just can't look through.
Help would be really appreciated!
Greetings, Luinechor |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 42
| Subject: Re: Compiling SPARK on Mac OS X Mon Jan 25, 2010 12:13 pm | |
| Hi,
the project SPARK (not to compile) is as stated not intended to be compiled. The other projects are however. Simply open the SPARK workspace and select in the tool bar : build -> build workspace. If you are running code blocks under mac, the mac version will be compiled (even if the name is release win32 or debug win32 that s due to the visual import of the project). | |
|
| |
Luinecho Guest
| Subject: Re: Compiling SPARK on Mac OS X Tue Jan 26, 2010 12:16 pm | |
| Thanks! Well, yeah, I tried to compile that 'not to compile' thing because it was the only project that seemed to compile. If I tried to compile (build and run) the other project it always said 'select a host application to run', but only builiding (as it should do) works now (with the latest svn).
Just one more question: If I try to compile some of the projects it says that, for example, windows.h could not be found. Actually it should'nt even try to include windows.h because "#if defined(WIN32) should be false". However, it still tries to include, but I guess I can just uncomment or delete those lines of code? In fact they arent't even needed for the mac os x spark.
(like removing this:) #if defined(WIN32) || defined(_WIN32) #include <windows.h> #endif |
|
| |
Luinecho Guest
| Subject: Re: Compiling SPARK on Mac OS X Tue Jan 26, 2010 1:03 pm | |
| Well, removed that specific windows code and successfully compiled all SPARK libraries (not the SPARK_IRR, but I want to use SFML, so this does not matter).
I added the 3 .o files to the frameworks in Xcode. I can now compile and run my application without errors, but 3 warnings:
ld: warning: in /Users/.../SPK_All.o, file is not of required architecture ld: warning: in /Users/.../SPK_GL_All.o, file is not of required architecture ld: warning: in /Users/.../SPK_SFML_All.o, file is not of required architecture
And I can't include the SFML like explained in the tutorial (#include <SPK.h>). It always says 'no such file or directory'. I googled a lot about the warnings but nothing helped me (like setting the linking flag to -m32). Also I have no idea about these libraries and file-formats (never compiled a library by myself). =/
Any suggestions? |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 42
| Subject: Re: Compiling SPARK on Mac OS X Fri Jan 29, 2010 7:48 am | |
| Hi, I m not really use to compiling under mac OS as I dont own a mac.
However the WIN32 macro should not be defined for mac. You need to update the projects by removing the WIN32 macro properties->projects settings->project's build options->#define and maybe in properties->projects settings->Platforms select only mac.
In theory the lib is cross platform but i ve always only compiled the windows version so the setting of the projects are orignally for windows. | |
|
| |
Luinecho Guest
| Subject: Re: Compiling SPARK on Mac OS X Fri Jan 29, 2010 11:28 am | |
| Thanks for help, that worked. Building the library is not the problem anymore. If I add the SPK_All.o File and more to Xcode and compile it always says: ld: warning: in /Users/.../SPK_All.o, file is not of required architecture
I tried to change the compiler settings but nothing helped. I also have some libraries in the sparksvn/lib/mingw/static now, all .a files but If I add them into Xcode -> same thing. Not of required architecture and trying to #include <SPK.h> ends with 'no such file or directory'. |
|
| |
Luinecho Guest
| Subject: Re: Compiling SPARK on Mac OS X Fri Jan 29, 2010 11:46 am | |
| Okay, well. I think I have to tell the linker/compiler/whatever what architecture spark should be linked or something like that: |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 42
| Subject: Re: Compiling SPARK on Mac OS X Thu Feb 11, 2010 8:05 am | |
| Hi,
have you finally manage to compile the lib under mac and have it work ? | |
|
| |
Luinecho Guest
| Subject: Re: Compiling SPARK on Mac OS X Thu Feb 18, 2010 4:45 pm | |
| Yep, I also wrote a german article I'm gonna translate it into english so everyone's able to compile and use it under mac. |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 42
| Subject: Re: Compiling SPARK on Mac OS X Fri Feb 19, 2010 12:56 pm | |
| | |
|
| |
Luinechor
Messages : 3 Date d'inscription : 2010-02-22
| Subject: Re: Compiling SPARK on Mac OS X Mon Feb 22, 2010 12:27 pm | |
| | |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 42
| Subject: Re: Compiling SPARK on Mac OS X Fri Feb 26, 2010 10:08 am | |
| Nice, have you tried running some examples under mac ? | |
|
| |
Luinechor
Messages : 3 Date d'inscription : 2010-02-22
| Subject: Re: Compiling SPARK on Mac OS X Sat Feb 27, 2010 1:44 pm | |
| Well, I'm using a simple particle effect in my spaceshooter, whick works on Mac like it does on Windows. However, I did not try other examples, yet. | |
|
| |
Sponsored content
| Subject: Re: Compiling SPARK on Mac OS X | |
| |
|
| |
| Compiling SPARK on Mac OS X | |
|