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

Author Topic: Copy program/game to other machines  (Read 2935 times)

0 Members and 1 Guest are viewing this topic.

Eldhom

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Copy program/game to other machines
« on: October 03, 2013, 03:15:09 pm »
How can i copy the compiled program to another mac.
I've created a map with the program and the resources (images and soundfiles) but I'm not sure what to do with the library and it asks for libsfml-graphics.2.dylib etc.

dyld: lazy symbol binding failed: Symbol not found: __ZN2sf12RenderWindowC1ENS_9VideoModeERKSsjRKNS_15ContextSettingsE
  Referenced from: /Users/*****/./a.out
  Expected in: /usr/local/lib/libsfml-graphics.2.dylib

dyld: Symbol not found: __ZN2sf12RenderWindowC1ENS_9VideoModeERKSsjRKNS_15ContextSettingsE
  Referenced from: /Users/*****/./a.out
  Expected in: /usr/local/lib/libsfml-graphics.2.dylib

Trace/BPT trap: 5
« Last Edit: October 03, 2013, 03:18:48 pm by Eldhom »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #1 on: October 03, 2013, 03:44:52 pm »
First, update the binary from 2.0 RC to 2.1. That's why you have those missing symbols.

Second, many information are in the getting started tutorial. Have you read it?
SFML / OS X developer

Eldhom

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #2 on: October 04, 2013, 11:20:35 am »
I don't think you quite understood what i wanted help with. I want to be able to run this program on any mac without installing the binaries, how do i do that?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #3 on: October 04, 2013, 11:24:54 am »
By reading the tutorial...... If you have specific question, please ask. But at least read what's in there first!
SFML / OS X developer

The Illusionist Mirage

  • Full Member
  • ***
  • Posts: 115
  • My Life = Linux, C++ & Computers
    • View Profile
    • fleptic
    • Email
Re: Copy program/game to other machines
« Reply #4 on: October 04, 2013, 12:27:04 pm »
First, update the binary from 2.0 RC to 2.1. That's why you have those missing symbols.

How could you actually find out the reason his code didn't compile was due to older binaries?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #5 on: October 04, 2013, 12:45:51 pm »
@The illusionist mirage, well it demands some knowledge in symbols. You can «see» (I admit, it's not pretty easy!) above that the symbol for the RenderWindow constructor has three parameters: VideoMode, std::string and ContextSettings. But the signature of this constructor has changed from 2.0 RC to 2.0. the string is now a sf::String. The issue was discussed a few times in the past on this forum.

But that's not the reason why I'm pissed off. His(her?) initial question «how can I make it run on other Mac» is discussed in the getting started tutorial. (S)he didn't bother reading it even after I mentioned it in my first answer.

The thing is pretty much everyone with an issue related to Mac that comes to this forum hasn't read the tutorial or done any googling. Most of the questions were already discussed several times and have known answers. And since I don't have much free time, I usually give short answer with some kind of «RTFM».

If the tutorial is not clear on a specific point I would gladly extend the discussion but one has to first do his/her homework before asking questions. That's the basis of courtesy when you know how much time the SFML team spend writing tutorials and answering the forum.

But let's refocus on the subject, shall we?  ;)
SFML / OS X developer

Eldhom

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #6 on: October 04, 2013, 02:13:37 pm »
Okay then I'm probably just stupid because I can't find anything about that in the tutorials.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #7 on: October 04, 2013, 10:12:40 pm »
It's true that the tutorial doesn't explicitly discuss deployment issues, but if you read the other stuff carefully the really big hints are there, in particular:
Quote
SFML dependencies
SFML needs only two external libraries on Mac OS X. Copy sndfile.framework and freetype.framework from extlibs to /Library/Frameworks.

When I made a Mac version of my program I found that distributing these two frameworks was the main thing I needed to worry about to get it to work on my friend's real Mac (rather than my Hackintosh VM).  After some googling, I figured out that Mac OS will automatically look for frameworks at [executable path]/../Frameworks/ if they aren't installed in /Library/Frameworks, after which it was fairly easy to figure out how to arrange my files and zip them all up in a way that worked on my friend's Mac "out of the box."

I also had a minor issue with the current working directory not being what I expected on Mac OS, but hopefully that doesn't affect you.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #8 on: October 05, 2013, 12:51:36 pm »
Quote from: tutorial
Your new project is now set to create an application bundle ".app".

Quote from: tutorial
2. Resource files: the resources of the basic example are put in this folder and are automatically copied to your application bundle when you compile it.

My favorite, the last sentence:

Quote from: tutorial
However, please note that the SFML dependencies of your project are added to your application bundle, in a similar way than the resources are copied, so that it will run out of the box on another Mac without any prior installation of SFML or its dependencies.




When I made a Mac version of my program I found that distributing these two frameworks was the main thing I needed to worry about to get it to work on my friend's real Mac

It's taken care of by the template if you create an App (not a CLT).

SFML / OS X developer

Eldhom

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Copy program/game to other machines
« Reply #9 on: October 06, 2013, 07:41:17 pm »
Thank you.

 

anything