Qt World Summit: Submit your Presentation

Library Issues (SDL)

  • I'm about ready to tear my hair out. I'm not used to using Qt, and I'm using a privately developed SDK for programming a Multitouch device. I transferred my code from an old computer to a new one running Lion, and while it worked in Snow Leopard and the environment I configured there, it's now throwing up errors over the stupidest things.

    So, my issue. I'm not familiar with the .pro file, and I will not pretend to being comfortable with its set up. Here are the contents of the file:
    @SOURCES += Main.cpp

    CONFIG -= qt

    TARGET = HelloWorld

    macx {
    LIBS += -framework Nimble
    LIBS += -framework Radiant -framework Luminous -framework Screenplay
    LIBS += -framework MultiTouch -framework MultiWidgets
    LIBS += -framework Valuable -framework Fluffy -framework Poetic
    LIBS += -lSDL -lSDLmain

    LIBS += -framework Cocoa

    HEADERS +=

    When I try to compile the code, I get the following error from the compiler.

    @09:49:00: Running build steps for project HelloWorldExt...
    09:49:00: Configuration unchanged, skipping qmake step.
    09:49:01: Starting: "/usr/bin/make" -w
    make: Entering directory /Users/mwl36/Desktop/Source' g++-4.2 -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o HelloWorld.app/Contents/MacOS/HelloWorld Main.o tilewidget.o activewidget.o scorewidget.o tilehome.o -framework Nimble -framework Radiant -framework Luminous -framework Screenplay -framework MultiTouch -framework MultiWidgets -framework Valuable -framework Fluffy -framework Poetic -lSDL -lSDLmain -framework Cocoa ld: library not found for -lSDL collect2: ld returned 1 exit status make: *** [HelloWorld.app/Contents/MacOS/HelloWorld] Error 1 make: Leaving directory/Users/mwl36/Desktop/Source'
    09:49:01: The process "/usr/bin/make" exited with code 2.
    Error while building project HelloWorldExt (target: Desktop)
    When executing build step 'Make'@

    This project file worked perfectly fine on the old computer. I know I'm being peevish about this, but I just don't know what I'm doing wrong. Is the error in the .pro file? Or is it in my library hierarchy?

  • I'm using a Linux but maybe this will be useful also on Mac.

    Have you installed a sdl and sdl-devel stuff?
    Did you have in PATH a directory where is a SDL lib? If no you could try add this directory.
    LIBS += -L/path/where/is/sdl/lib -lSDL -lSDLmain

  • Hi Hostel,

    Thank you for your response! I did try to do something like that, but it then freaked out about other things. It turns out the darn developers for the SDK didn't tell me they moved things around in their latest release, so I had to adjust my qmake steps. ARGH! Thank you so much for your help!

  • Hi brynn - I'm happy that you solved your issue.
    Can you write what you had to changed?
    Which SDK was used on old computer and which you are using now?

  • Hi Hostel,

    It was for the Cornerstone SDK; I had been using 1.1.2, and upgraded to 1.2.0. The changes I needed to make were to add the following lines to my .pro file:

    @INCLUDEPATH += /opt/multitouch/include
    QMAKE_LIBDIR += /opt/multitouch/lib@

    After that, everything worked beautifully. :)

Log in to reply