Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: making SFML project without using template  (Read 1724 times)

0 Members and 2 Guests are viewing this topic.

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
making SFML project without using template
« on: February 22, 2013, 11:09:24 pm »
I'd like to be able to make my own project from scratch rather than use the templates provided and have to delete what I don't need (essentially everything)

How can I include the framework into my xcode project? That would include the headers and libs I need right? Or would I have to include each separately.

Currently, trying this without the templates is impossible to even compile because Xcode can't find the SFML headers.

I'd like to have this set up as simple as Codeblocks (adding libs and header search paths) but I don't want it spoon fed to me in the form of pre-made template projects.

I'm sure this feature exists in Xcode as it does in Codeblocks and VisualStudio I just haven't found it.

Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: making SFML project without using template
« Reply #1 on: February 23, 2013, 08:20:13 am »
Of course, it's possible but it would be kind of tricky to achieve the same, mostly if you want a bundle application.

First, you need to be fluent with Xcode; that is, you need to know how to link against frameworks/dylibs. If you don't know how to do that I recommend reading the getting started / user guide from Apple.

Next, if you build SFML as frameworks (which I recommend), you need to link against sfml-<MODULE_NAME>.framework. The header are in SFML.framework but you needn't to link against this one (theoretically).

If you choose to build SFML as dylib, the header are in /usr/local/include by default. You might need to add this path to the include search path with some versions of Xcode.

But doing this won't create a bundle app. And to do that.... you better start early in the morning... (you can create a Cocoa App project and then refactor it to remove the cocoa part, but it's not that trivial..)

So creating a project through the project wizard is simpler for the same/better result.

NB: when I say "build SFML", I really mean "build AND install SFML".
SFML / OS X developer

 

anything