Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Compiling SPARK on Mac OS X

Go down 
2 posters
AuthorMessage
Luinecho
Guest




Compiling SPARK on Mac OS X Empty
PostSubject: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeSun 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
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeMon 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).
Back to top Go down
http://spark.developpez.com
Luinecho
Guest




Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeTue 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
Back to top Go down
Luinecho
Guest




Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeTue 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?
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeFri 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.
Back to top Go down
http://spark.developpez.com
Luinecho
Guest




Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeFri 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'.
Back to top Go down
Luinecho
Guest




Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeFri 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:
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeThu Feb 11, 2010 8:05 am

Hi,

have you finally manage to compile the lib under mac and have it work ?
Back to top Go down
http://spark.developpez.com
Luinecho
Guest




Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeThu 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.
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeFri Feb 19, 2010 12:56 pm

Nice, thank you
Back to top Go down
http://spark.developpez.com
Luinechor




Messages : 3
Date d'inscription : 2010-02-22

Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeMon Feb 22, 2010 12:27 pm

Hey,
I translated the article into english. It can be found here:
http://www.lycron.de/?p=103&lang=en

Hope my english is okay.

Greetings,
Luinechor
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeFri Feb 26, 2010 10:08 am

Nice, have you tried running some examples under mac ?
Back to top Go down
http://spark.developpez.com
Luinechor




Messages : 3
Date d'inscription : 2010-02-22

Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitimeSat 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.
Back to top Go down
Sponsored content





Compiling SPARK on Mac OS X Empty
PostSubject: Re: Compiling SPARK on Mac OS X   Compiling SPARK on Mac OS X Icon_minitime

Back to top Go down
 
Compiling SPARK on Mac OS X
Back to top 
Page 1 of 1
 Similar topics
-
» Compiling SPARK 2 on Gentoo Linux
» Problems compiling SPARK with SFML on VC++ 2008 EE
» [SPARK2] Compiling Errors
» Compiling error in linux
» SPARK2 Slow linking and compiling

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: