Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QT Creator with SDL (OSX, Windows)

QT Creator with SDL (OSX, Windows)

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 3 Posters 6.8k Views
  • 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.
  • D Offline
    D Offline
    douglett
    wrote on 23 Jul 2013, 12:05 last edited by
    #1

    Hi, I am trying to get QT creator to run in these environments to compile a simple SDL app. I have SDL installed in the correct location, and am compiling with the following .pro:

    @
    TEMPLATE = app
    CONFIG += console
    CONFIG -= app_bundle
    CONFIG -= qt

    SOURCES += main.cpp

    CONFIG -= x86_64
    CONFIG += x86
    INCLUDEPATH += /Library/Frameworks
    INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
    LIBS += -framework Cocoa -framework SDL

    OBJECTIVE_SOURCES += SDLMain.m
    HEADERS += SDLMain.h
    @

    The compiler error I get is:

    @
    ld: framework not found SDL
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [sdltest] Error 1
    @

    Suggesting that the framework was not found. Any info or help would be appreciated.

    EDIT: this issue is for OSX at the moment.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Jul 2013, 14:39 last edited by
      #2

      Hi and welcome to devnet,

      You might be missing:

      @LIBS += -F/Library/Frameworks@

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        douglett
        wrote on 23 Jul 2013, 15:06 last edited by
        #3

        Hi, thanks for the reply. I ended up with the following:

        @
        QMAKE_LFLAGS += -F/Library/Frameworks
        @

        But both accomplish the same goal (I prefer to use yours). I checked the man page for the linker, and it says this:

        bq. The -L option will add a new library search path. The default framework search path is /Library/Frameworks then /System/Library/Frameworks. The -F option will a new framework search path. The -Z option will remove the standard search paths.

        So that explains that :). For anyone searching for this, my app entry point turned out to be:
        int SDL_main(int argc, char** argv)

        Cheers, i'll pop in if I have more problems with the windows build this afternoon.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Jul 2013, 15:54 last edited by
          #4

          You're welcome !

          Since it's all good, don't forget to update the thread's title to solved so other forum users will know that a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            Phenixo
            wrote on 29 Dec 2014, 23:58 last edited by
            #5

            Hi, did you config SDL with qtcreator in windows?. Because I have same probleme and I want to ask you?

            to be a professional programmer is my goal :p

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Phenixo
              wrote on 29 Dec 2014, 23:58 last edited by
              #6

              Hi, did you config SDL with qtcreator in windows?. Because I have same probleme and I want to ask you?

              to be a professional programmer is my goal :p

              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