SFML community forums

Help => General => Topic started by: wvtrammell on May 10, 2013, 05:47:46 pm

Title: SFML 2.0 0n MAC
Post by: wvtrammell on May 10, 2013, 05:47:46 pm
Hi
I  down loaded file SFML 2.0 Clang (OS X 10.5+)
on a machine using OSX 10.8.3 and Xcode 4.6.2.
I followed the instructions in paragraph "Installing SFML" from the tutorial.
In Xcode I chose the options shown in the tutorial for a new project.
The project navigator displays all the files shown in tutorial.
After compile:
Messages shown read:
/Users/Warren/Library/Developer/Xcode/DerivedData/MyFirstSF MLApp etc etc etc.
This directory doesn't exist on my machine.

25 Errors read:
Apple Mach -O Linker (ld) Error etc etc etc.
Any one else having this problem with this configuration?

Thanks
Warren Trammell
Title: Re: SFML 2.0 0n MAC
Post by: Hiura on May 10, 2013, 09:07:55 pm
well, the «etc etc» holds all the relevant info so.. what does it say ?
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 11, 2013, 12:32:59 am
Link /User/warren/Library/Developer/Xcode/DerivedData/MyFirstSFMLApp -fyashrrxljkkmrdhkkvobmiqotey/Build/intermediates/MyFirstSFMLApp.Build/Debug/MyFirstSFMLApp/Objects-normal/x86_64/MyFirstSFMLApp

"sf::RenderWindow::RenderWindow(sf::VideoMode,std::allocator<char>> const&, unsigned int, sf::ContentSettings, const&)" Referenced from: -main in main.o

"sf::Font::LoadFromFile( etc
"sf::Image::LoafFronFile( etc
"sf::Music::OpenFromFile( etc

Get the picture?
Thanks
Warren
Title: Re: SFML 2.0 0n MAC
Post by: Hiura on May 11, 2013, 08:03:43 pm
Quote
Get the picture?

No. Not with so few information.. as I said, you removed the very critical information with your «etc»..

You can copy the whole log from `View > Navigators > Show Log Navigators` if that's your issue.
Title: Re: SFML 2.0 0n MAC
Post by: Cornstalks on May 11, 2013, 08:23:11 pm
It sounds to me like you're linking to the wrong standard library. Also, you left out some important information:

Hi
I  down loaded file SFML 2.0 Clang (OS X 10.5+)
on a machine using OSX 10.8.3 and Xcode 4.6.2.
Where did you download this? The official SFML downloads don't have SFML 2.0 Clang (OS X 10.5+). The two official options are: GCC (OS X 10.5+) or Clang (OS X 10.8+).

My guess is that you downloaded some version of SFML that linked to a particular implementation of the standard C++ library, and your project is linking to a different implementation of the standard C++ library.
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 14, 2013, 12:24:55 am
My bad I meant 10.8.
I agree with your linking comment but I am just following the tutorial for installation. How do I link properly?
It doesn't seem to matter what I have in the main I still get the same general linking error messages.
I am new to Xcode so I do  not know how to any of that info to post it.
Warren
Title: Re: SFML 2.0 0n MAC
Post by: Cornstalks on May 14, 2013, 03:46:17 am
My bad I meant 10.8.
I agree with your linking comment but I am just following the tutorial for installation. How do I link properly?
It doesn't seem to matter what I have in the main I still get the same general linking error messages.
I am new to Xcode so I do  not know how to any of that info to post it.
Warren
The download page doesn't say this (and I think it should), but the Clang 10.8 binaries link to libc++. Here, I made an image (sorry it's big) (http://i.imgur.com/mHqfcPa.jpg).
Title: Re: SFML 2.0 0n MAC
Post by: Hiura on May 14, 2013, 08:16:58 am
i'm not sure it's *only* a linking issue.. if your issues persist give us the whole error message, not just some part of it.
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 14, 2013, 05:23:33 pm
Marco
Files under Project agree with your image.
Box Q is blank on mine
Apple LLVM compiler 4.2:
on mine reads Apple LLVM GCC 4.2
Thanks
Warren
Title: Re: SFML 2.0 0n MAC
Post by: Cornstalks on May 14, 2013, 06:58:44 pm
Marco
?

Files under Project agree with your image.
It's not the files; ignore them.

Box Q is blank on mine
Not sure what Box Q is.

Apple LLVM compiler 4.2:
on mine reads Apple LLVM GCC 4.2
Then you're using GCC. Not Clang. You downloaded Clang SFML. Change it to "Apple LLVM compiler 4.2" to use Clang. Also make sure you set your linker options right.

Make your options exactly like I say to in the red text if you want to use Clang SFML binaries.
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 15, 2013, 01:48:28 am
I followed the tutorial except for the compiler option. I chose C++11 with clang and libc++.
With this I get all your red letter data but these errors when I compile the downloaded source file
Sorry it said my error file was too large to attach.
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 15, 2013, 10:15:15 pm
Please explain how to set the linker options right.
Thanks
Warren
Title: Re: SFML 2.0 0n MAC
Post by: The Terminator on May 16, 2013, 12:06:49 am
http://www.sfml-dev.org/tutorials/2.0/start-osx.php

Don't expect other people to solve your problems. We'll help you if you post relevant information and don't demand answers.
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 16, 2013, 04:55:17 pm
If I knew how to solve the problem I would not be begging for help.

If you or someone you know has successfully installed SFML 2.0
on a machine using OSX 10.8.3 and Xcode 4.6.2 please explain
how it was done either here or e-mail me at wvtrammell@me.com..
I will be eternally grateful, well at least for 10 years as I will be 90 this October.
Warren Trammell

Title: Re: SFML 2.0 0n MAC
Post by: The Terminator on May 16, 2013, 11:59:08 pm
I have. I simply followed the link I gave you and it worked perfectly for me.
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 17, 2013, 01:31:09 am
As I read that link. it has many options as you proceed thru the installation.  I believe I have tried nearly every possible combination of those options, but if you found a combination that worked I guess I missed it.
Glad to know someone was successful.
Thanks for the info. I will keep looking at possible combinations.
Warren
Title: Re: SFML 2.0 0n MAC
Post by: Hiura on May 17, 2013, 11:21:44 am
if you installed multiple version of SFML then you'll get into trouble. remove everything you installed and start over fresh. the only combination you have to choose is the version of the system you're targeting. if you want your app to run on 10.5, download the corresponding version from the download page and configure your project accordingly (see tutorial for details).
Title: Re: SFML 2.0 0n MAC
Post by: wvtrammell on May 18, 2013, 04:50:35 am
CornStock
 I am running Xcode 4.6.2 and that must be the problem. Comparing my results to your image you posted.
It looks the same except for the blocks in the middle.  I have the block "Summary Info  Build Settings Build Rules"
But under that block the first block is labeled OS X S Application Target
The second block is labeled Linked Frameworks & Libraries
The next block is labeled Entitlements

I clicked on the target as you show in your image  and this is what I get.
My left and right panels are in perfect agreement with your image.