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

Author Topic: Compiling & Linking  (Read 1108 times)

0 Members and 1 Guest are viewing this topic.

wvtrammell

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Compiling & Linking
« on: October 13, 2012, 07:35:16 pm »
Hi
The following commands work great to create a file to run on my computer.

g++ -F /Library/Frameworks -c main.cpp
g++ main.o -framework sfml-window -framework sfml-graphics -framework sfml-system -o mark

What commands do I need to get a file to run on my son's MAC?
Thanks a heap.
Warren Trammell

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Compiling & Linking
« Reply #1 on: October 14, 2012, 09:36:38 am »
Hi Warren,

There is two (at least) solutions :

- Install SFML on his computer as well and then send him the «mark» program you wrote.

- Create application bundle and put SFML frameworks inside the bundle. This one is waaay more complicated if you want to do it on the command line. You can either use the SFML templates for Xcode 4 and everything will be done for you. Or you can create the bundle manually.

You can find some doc here : https://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/Introduction/Introduction.html#//apple_ref/doc/uid/10000123i-CH1-SW1
and this SO could be helpful : http://stackoverflow.com/questions/1596945/building-osx-app-bundle
SFML / OS X developer