Skip to content

Conversation

@JonnyPtn
Copy link
Contributor

With imminent removal of our xcode templates (SFML/SFML#3622) the tutorials need updating (frankly they needed it anyway as they are very old)

This replaces the template tutorial with the manual project setup for both static and dynamic linking

Framework setup is omitted as I found some issues when testing them (I never use them normally) so want to try and work them out first, and there's possibly even an argument that we shouldn't bother shipping frameworks at all, for a separate discussion

You can find more details in [this document](https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/DynamicLibraries/ "Go to Apple's documentation about dylib").
- Frameworks are fundamentally the same as dylibs, except that they can encapsulate external resources.
Here is [the in-depth documentation](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Frameworks.html "Go to Apple's documentation about framework").
Then, in order to start developing SFML applications, you have to install the following items:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which following items?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, seems like a leftover line from before

Copy link
Member

@eXpl0it3r eXpl0it3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add periods at the end of the sentences / paragraphs.

- **Xcode templates**
This feature is optional but we strongly recommend that you install it.
Copy the SFML directory from templates to `~/Library/Developer/Xcode/Templates` (create the folders if they don't exist yet).
Now you have a basic project with a `main.cpp` file for your code. You can replace the contents with this SFML code to draw a green circle:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each sentence should be on its own line, for better diffs

But currently it will not build, as we need to configure Xcode so it can find SFML's headers and libraries

![Xcode template form](osx-new-project-settings.png "Xcode template form")
For header paths, select your project on the sidebar, go to the build settings tab and set the Header Search paths (filter can help find the setting) to the `include` folder in your unpacked SFML folder (or brew include folder if using brew, e.g. `/opt/homebrew/include`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For header paths, select your project on the sidebar, go to the build settings tab and set the Header Search paths (filter can help find the setting) to the `include` folder in your unpacked SFML folder (or brew include folder if using brew, e.g. `/opt/homebrew/include`)
For header paths, select your project on the sidebar, go to the build settings tab and set the Header Search paths (filter can help find the setting) to the `include` folder in your unpacked SFML folder, e.g. `<sfml-install-path>/include` (or brew include folder if using brew, e.g. `/opt/homebrew/include`)


![Xcode header settings](osx-header-paths.png "Xcode header search path settings")

For library paths, do the same for the Library Search path setting, using the `lib` folder in your unpacked SFML folder (or brew lib folder if using brew, e.g. `/opt/homebrew/lib`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For library paths, do the same for the Library Search path setting, using the `lib` folder in your unpacked SFML folder (or brew lib folder if using brew, e.g. `/opt/homebrew/lib`)
For library paths, do the same for the Library Search path setting, using the `lib` folder in your unpacked SFML folder, .e.g `<sfml-install-path>/lib` (or brew lib folder if using brew, e.g. `/opt/homebrew/lib`)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants