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

Author Topic: Problems Installing: Clang linker errors  (Read 6352 times)

0 Members and 2 Guests are viewing this topic.

feldspar

  • Newbie
  • *
  • Posts: 4
    • View Profile
Problems Installing: Clang linker errors
« on: October 04, 2014, 01:10:13 am »
Hello, I'm new to this forum and to C++/SFML.  I was having a similar problem as this thread: http://en.sfml-dev.org/forums/index.php?topic=16395.0, and wasn't sure if I should create a new post or resurrect that one, since it's only about a week old.

I followed the instructions on the SFML tutorial and downloaded the command line tools.  I downloaded the SDK and put the content of Frameworks in library/frameworks (although I had to create the folder).  I copied the listed dependencies into the same folder.  I copied the Templates into the Templates folder (which I also had to create) then I created a new project with all the settings it told me to choose.  Whenever I try to build I always get the error.

I was having the same clang errors as the OP in the other thread, with an unknown argument for system, window, graphics, etc.  I downloaded the new version of the templates (as somebody in that thread suggested), and that fixed that error, but now when I try to run it I get only one error that says: "Apple Mach-O Linker (id) Error", "ld: framework not found sfml-system", and "clang: error: linker command failed with exit code 1"

I am using Xcode 6 and OS X 10.9.4

Also, I don't know if this is important, but on the SFML install tutorial it shows a image of the Xcode window with all the resource and code files on the left hand tab.  Mine looks exactly the same except I have no Frameworks folder beneath Supporting Files.
« Last Edit: October 04, 2014, 01:13:38 am by feldspar »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problems Installing: Clang linker errors
« Reply #1 on: October 04, 2014, 01:17:53 pm »
check your install; you probably haven't copied everything / copied it to the right folder.
SFML / OS X developer

feldspar

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Problems Installing: Clang linker errors
« Reply #2 on: October 05, 2014, 11:47:16 pm »
I redownloaded and placed all my files, according exactly to the install tutorial.  I put the contents of Frameworks in MyName/Library/frameworks, I put the SFML dependencies in the same folder, and I downloaded the xcode 5 templates and put them in MyName/Library/Developer/Xcode/Templates.  Nothing changed.  Anything I missed or any other ideas?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problems Installing: Clang linker errors
« Reply #3 on: October 06, 2014, 09:15:53 am »
I put the contents of Frameworks in MyName/Library/frameworks
That's not what the tutorial instructs to do.
SFML / OS X developer

feldspar

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Problems Installing: Clang linker errors
« Reply #4 on: October 06, 2014, 08:19:20 pm »
My apologies, I assumed that library/frameworks meant THE main library folder. Where is it supposed to go?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problems Installing: Clang linker errors
« Reply #5 on: October 06, 2014, 08:55:20 pm »
The tutorial says /Library/Frameworks. There's only one folder called that way.
SFML / OS X developer

feldspar

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Problems Installing: Clang linker errors
« Reply #6 on: October 06, 2014, 10:35:52 pm »
ohhh, I see and have fixed the problem.  Thank you very much!

SKIN

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Problems Installing: Clang linker errors
« Reply #7 on: November 02, 2014, 05:48:37 pm »
I have the exact same issue as OP however have for sure got the files in the right /Library/Frameworks folder, the templates in the Developer/Xcode/Templates folder.

As well as these two steps:

dylib
Copy the content of lib to /usr/local/lib and copy the content of include to /usr/local/include.

SFML needs only two external libraries on Mac OS X. Copy sndfile.framework and freetype.framework from extlibs to /Library/Frameworks.

Still have the same errors, absolutely lost, Hiura or Feldspar could point me in the right direction or something else to double check/look at?

EDIT: Seems I have a little bit of a different issue, it doesn't say framework not found but

ld: file too small (length=0) file '/Library/Frameworks/sfml-system.framework/sfml-system' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
----
ld: file too small (length=0) file '/Library/Frameworks/sfml-window.framework/sfml-window' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


EDIT2:

Fixed it, see http://en.sfml-dev.org/forums/index.php?topic=16664.0
« Last Edit: November 02, 2014, 07:06:26 pm by SKIN »