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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TLHM

Pages: [1]
1
General / Re: Linking in Xcode 4
« on: June 23, 2012, 04:32:38 pm »
Thanks. Guess I should have done more searching specifically on site or in the bugs. My bad.

2
General / Linking in Xcode 4
« on: June 23, 2012, 07:53:25 am »
Hello, I've been trying to get Xcode to import the sfml library to no avail for a while now. I'm running OS 10.7.4 with the latest Xcode (4.3.3), and installed SFML2.0 via the installer. I've tried the template, both using frameworks and not, and neither of them work. Both have linker issues. When using frameworks, it complains on the first include line (say, #include<SFML/Audio.hpp>), saying that the file cannot be found. When not using frameworks, the linker says it cannot find the library
ld: library not found for -lsfml-system-d
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Figuring I'd make an even simpler test, I created a simple command line application project, and added an include line for <SFML/Graphics.hpp>, and then added the SFML framework to the "Link Binary with Libraries" in the Build Phases tab. This also resulted in the file not found error.

I am new to this version of Xcode, so I'm hoping this is caused by some simple error on my part. Any help would be appreciated. Note that I have spent a couple hours now looking at linking tutorials for xcode 4 but none of them seem to have worked. As far as I can tell, the simplest method of doing so is the one I described int he paragraph above, but I also trying adding /usr/local/lib to the library search paths, and adding -lsfml-graphics to the "Other Linker flags", as well as adding the framework directly to the frameworks folder in the project, and just dumping the header files into the project (which I'm sure would raise issues with finding the c files anyways, even if all the imports worked out).

Thanks.

Pages: [1]