Re: [Jack-Devel] Windows dev: error linking libjack64.lib
Is this "jack_get_version_string" symbol the only one from the JACK API that causes a link error?
Stéphane
Le 17 janv. 2013 à 12:30, Julien Rosener a écrit :
> Hello,
>
> I am trying to port an application using Jack from Linux to Windows. I
> have an issue when linking with libjack64.
>
> My development environment is Windows 7 64 bits + QtCreator (using
> Visual Studio 10.0 as compiler/linker).
>
> I installed Jack binaries for Windows and found Jack\lib\libjack64.lib
> and C:\Windows libjack64.dll.
> I would like to use these 2 files to link with Jack, for that I wrote
> a small exemple with QtCreator.
>
> [.pro]
> This is the part about lib linking (.lib and .dll are in
> jack-1.9.9/lib/, .h are in jack-1.9.9/includes) :
>
> win32: LIBS += -L$$PWD/jack-1.9.9/lib/ -llibjack64
> INCLUDEPATH += $$PWD/jack-1.9.9/includes
> DEPENDPATH += $$PWD/jack-1.9.9/includes
>
> [.cpp]
> #include <jack/jack.h>
> int main(int argc, char *argv[])
> {
> QApplication a(argc, argv);
> QLabel versions;
>
> // get jack version
> versions.setText(QString("libjack v") + QString(jack_get_version_string()));
>
> versions.show();
> return a.exec();
> }
>
> [Build error]
> Compilation is OK, but link stage fails with:
> "main.obj : error LNK2019: unresolved external symbol
> _jack_get_version_string referenced in _main"
>
> [Comments]
> I do not understand why it is failling because I am always doing
> successfully like that with other libs, I have got suppositions :
> - some paths are wrong ?
> - should I link statically instead of dynamically ?
> - libjack64.lib was not compiled with a MSVC compiler and so I can't
> link using MSVC ?
> - is it a QtCreator related issue ?
>
> If it is not possible (for some reasons) to link against
> libjack64.lib, would it be a good solution to load only libjack64.dll
> at runtime using LoadLibrary("libjack64.dll") ?
> Another solution is to recompile Jack on Windows but I only have
> Visual Studio 2012 express which seems not to be supported according
> to the REAMDE in Windows source directory.
>
> I am definitely not a Windows developer, so maybe I just do not
> understand nicely how DLL linking is working.
>
> Do you have any idea what is the best way to link libjack64 using MSVC
> compiler ?
>
> Bests,
> Julien.
>
> Jack-Devel mailing list
> [hidden]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
1358426892.11430_0.ltw:2,Sa <7BE4C747-52F6-4212-ABB2-CEFB17F71BE8 at grame dot fr>