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

Author Topic: SFML 2.0 on Mac OS X Lion, Xcode 4.1 giving run-time error?  (Read 2996 times)

0 Members and 1 Guest are viewing this topic.

Leugim

  • Newbie
  • *
  • Posts: 9
    • MSN Messenger - miguel_is_sexy@hotmail.com
    • View Profile
SFML 2.0 on Mac OS X Lion, Xcode 4.1 giving run-time error?
« on: September 23, 2011, 06:38:07 pm »
Okay so after about 3 hours or so, I finally figured out how to link my project up to SFML 2.0, using the templates provided, but it just would keep giving me errors. Anyhow once I finally made it working I wen't to run and then it came up with a run-time error:

The output from the run-time error, it also came up with a dis-assembler window too.

Code: [Select]

warning: Unable to read symbols for @executable_path/../Frameworks/libsfml-system-d.2.dylib (file not found).
warning: Unable to read symbols from "libsfml-system-d.2.dylib" (not yet mapped into memory).
warning: Unable to read symbols for @executable_path/../Frameworks/libsfml-window-d.2.dylib (file not found).
warning: Unable to read symbols from "libsfml-window-d.2.dylib" (not yet mapped into memory).
warning: Unable to read symbols for @executable_path/../Frameworks/libsfml-graphics-d.2.dylib (file not found).
warning: Unable to read symbols from "libsfml-graphics-d.2.dylib" (not yet mapped into memory).
warning: Unable to read symbols for @executable_path/../Frameworks/libsfml-audio-d.2.dylib (file not found).
warning: Unable to read symbols from "libsfml-audio-d.2.dylib" (not yet mapped into memory).
warning: Unable to read symbols for @executable_path/../Frameworks/libsfml-network-d.2.dylib (file not found).
warning: Unable to read symbols from "libsfml-network-d.2.dylib" (not yet mapped into memory).
warning: Unable to read symbols for @executable_path/../Frameworks/sndfile.framework/Versions/A/sndfile (file not found).
warning: Unable to read symbols from "sndfile" (not yet mapped into memory).
[Switching to process 15731 thread 0x0]
dyld: Library not loaded: @executable_path/../Frameworks/libsfml-system-d.2.dylib
  Referenced from: /Users/miguel/Library/Developer/Xcode/DerivedData/SFML-fkqdktzopjllqmbaepebfgsawoso/Build/Products/Debug/SFML.app/Contents/MacOS/SFML
  Reason: no suitable image found.  Did find:
/usr/local/lib/libsfml-system-d.2.dylib: stat() failed with errno=13
sharedlibrary apply-load-rules all
(gdb)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2.0 on Mac OS X Lion, Xcode 4.1 giving run-time error?
« Reply #1 on: September 23, 2011, 07:42:32 pm »
Is your local version of SFML up-to-date ? Did you recompile and reinstall SFML when you did "git pull" ?

Quote
but it just would keep giving me errors.
What kind of errors ? How did you use the provided templates ?
SFML / OS X developer

Leugim

  • Newbie
  • *
  • Posts: 9
    • MSN Messenger - miguel_is_sexy@hotmail.com
    • View Profile
SFML 2.0 on Mac OS X Lion, Xcode 4.1 giving run-time error?
« Reply #2 on: September 24, 2011, 03:53:39 am »
Well at first it said it couldn't find "SFML/Graphics.hpp", then I fixed that I believe because I wasn't using Unix Make files and then after that it wouldn't compile because it couldn't some .dylib file and it said it failed with error code 1:
Code: [Select]

ld: library not found for -lsfml-system-d
Command /Developer/usr/bin/clang++ failed with exit code 1


Oh and this is version 2.0, I downloaded it last night and I used cmake 2.8.5.

I then changed the directory of the library files on where to output them in Cmake, it seemed to build after that once I directed the project to the file. But when I run it, it just crashed and does not work, it would help if there was a video or something so I know I'm doing everything correctly.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2.0 on Mac OS X Lion, Xcode 4.1 giving run-time error?
« Reply #3 on: September 24, 2011, 01:30:20 pm »
You did a lot of workaround ... hum... to make things easier :
Use Makefile instead of Xcode to build and install SFML. It's SO MUCH easier.
Moreover, consider building SFML as frameworks libraries. Most people are more familiar with them on Mac OS X than dylibs.

You can find information here : http://www.sfml-dev.org/forum/viewtopic.php?t=3613

If you still have some "warning: Unable to read symbols for" please tell me. It might be an error on my side.
SFML / OS X developer

Leugim

  • Newbie
  • *
  • Posts: 9
    • MSN Messenger - miguel_is_sexy@hotmail.com
    • View Profile
SFML 2.0 on Mac OS X Lion, Xcode 4.1 giving run-time error?
« Reply #4 on: September 24, 2011, 02:46:53 pm »
Seems to be working perfectly now, :D. Basically all I did was delete the cache held by Cmake 2.8.5 and then ticked the box build frameworks and built the Unix Make Files and then compiled them. After that I used the frameworks in my Application and it worked like a charm :) thank god for that, thank you very much :).