Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. SFML2 +QtCreator + MacOSX
Forum Updated to NodeBB v4.3 + New Features

SFML2 +QtCreator + MacOSX

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prsolucoes
    wrote on last edited by
    #1

    Hi,

    Im making a little tutorial about configure SFML in all systems using QtCreator IDE and i want configure now with MACOSX.

    Everything is OK when i build the project, i download the version RC for mac, extract to a path and link with my .pro and i compie with success.

    But when i will run i got error:

    [quote]dyld: Library not loaded: @executable_path/../Frameworks/libsfml-system.2.dylib
    Referenced from: /Users/paulo/Pessoal/workspaces/qt/sfml-project-build-desktop-Qt_4_8_1__gcc__Debug/sfml-project.app/Contents/MacOS/sfml-project
    Reason: image not found
    Press <RETURN> to close this window...
    [/quote]

    This is my .pro:

    [quote]TEMPLATE = app
    CONFIG += console
    CONFIG -= qt

    SOURCES += main.cpp

    INCLUDEPATH += "/Users/paulo/Pessoal/downloads/cpp/sfml/dylibs/root/usr/local/include"
    LIBS += -L"/Users/paulo/Pessoal/downloads/cpp/sfml/dylibs/root/usr/local/lib"
    -lsfml-system
    -lsfml-window
    -lsfml-graphics
    -lsfml-audio
    -lsfml-network
    [/quote]

    Example:

    My project when build, generate the path:

    /Users/paulo/Pessoal/workspaces/qt/sfml-project-build-desktop-Qt_4_8_1__gcc__Debug/sfml-project.app/Contents/MacOS/

    If i run the binary inside it, called: sfml-project , i get that error

    So what i do? I have created a new directory:

    /Users/paulo/Pessoal/workspaces/qt/sfml-project-build-desktop-Qt_4_8_1__gcc__Debug/sfml-project.app/Contents/Frameworks

    And copy all this files to it:

    SFML.framework
    libsfml-graphics.2.0.dylib
    libsfml-network.2.dylib
    libsfml-system.dylib
    sfml-audio.framework
    sfml-window.framework
    libsfml-audio.2.0.dylib
    libsfml-graphics.2.dylib
    libsfml-network.dylib
    libsfml-window.2.0.dylib
    sfml-graphics.framework
    sndfile.framework
    libsfml-audio.2.dylib
    libsfml-graphics.dylib
    libsfml-system.2.0.dylib
    libsfml-window.2.dylib
    sfml-network.framework
    libsfml-audio.dylib
    libsfml-network.2.0.dylib
    libsfml-system.2.dylib
    libsfml-window.dylib
    sfml-system.framework

    And when i run the binary, it works!

    But i need do it direct from QtCreator or link/auto-copy it to correct location.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      prsolucoes
      wrote on last edited by
      #2

      Hi.

      I solve the problem. Thanks

      1 Reply Last reply
      0
      • M Offline
        M Offline
        miroslav
        wrote on last edited by
        #3

        Hi prsolucoes!

        [quote author="prsolucoes" date="1334990836"]Hi.

        I solve the problem. Thanks[/quote]

        Could you quickly add here how you solved it? It may be interesting for other users later.

        Mirko Boehm | mirko@kde.org | KDE e.V.
        FSFE Fellow
        Qt Certified Specialist

        1 Reply Last reply
        0
        • P Offline
          P Offline
          prsolucoes
          wrote on last edited by
          #4

          I solve the problem on mac, but on windows i cant copy all DLLS, can you see the problem?

          The solution is in repository of the project.

          All is here:
          https://qt-project.org/forums/viewthread/16580/

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved