Important: Please read the Qt Code of Conduct -

Qt not finding jack audio definitions

  • I have a project that uses Jack Audio libraries. The includes and libraries are specified explicitly in the .pro but the linker still gives an undefined reference error for jack library calls to things like jack_client_close().

    Anyone have any idea on this?


    . . .
    LIBS += -L/usr/lib/x86_64-linux-gnu/lib/jack


    error produced:
    ...source-line: error: undefined reference to jack_client_close' ...source-line: error: undefined reference tojack_client_open'
    ...source-line: error: undefined reference to `jack_client_shutdown'

    24 errors in all similar to above.

    Using latest Qt SDK updates and QtCreator 2.5 on Ubuntu 12.04 64 bit (jack installed 1.9.8)

  • Moderators

    I think your .pro file line should look like:
    LIBS += -L/usr/lib/x86_64-linux-gnu/lib -ljack
    (-L is the path, and -l is the library name)

  • The statement is correct. The folder is called jack. there are seveal libjack* files in that path which will be used in the application.

  • Moderators

    You'll need to tell the linker which libraries you need, not just the folder of the locations.

  • Tried that and no change was the result.

  • Well I have had some success on Linux but not Windows XP. Still getting the same errors even with LIBS specified correctly.

    win32: {
    INCLUDEPATH += "C:\Jack\includes\"

    win32: {
    DEPENDPATH += "C:\Jack\lib\"

    win32: {
    LIBS += -L"C:\Jack\lib\" -ljack

    The lib folder specified does exist and contains libjack.lib, libjack.def, libjackserver.lib, libjackserver.def

    Now using Qt 5.1.1 on both Linux and Windows

  • Lifetime Qt Champion


    Are you sure you are using the jack library from the correct architecture ? And for windows, are they compiled using the same compiler ?

  • Well, I am calling from the Jack Audio library supplied by the Windows installer from their web site. The version is 1.9.9 32 bit.

    Jack on Windows is only compiled using MinGW as far as I know so it should be compatible. You can use VC from source but that is not the case here.

  • Lifetime Qt Champion

    Then the question is which version of mingw are you using and which one was used to build jack ?

  • MinGW 4.4

  • Lifetime Qt Champion

    If you are using the prebuilt mingw package then you have to rebuild jack with it. Qt's built with mingw 4.8

Log in to reply