Page 1 of 1

libvlc for mac os QT Creator - general newbie problem

Posted: 19 Mar 2011 20:27
by geostein8888
Hello,
because i have now a mac since 2 weeks or so i'm still not so familar with all this stuff.
under windows.

i want to build a QT application with this library under mac os, but i still get the following error:

dyld: Library not loaded: @loader_path/lib/libvlc.5.dylib
Referenced from: /Users/aa/QT.prj/vlctest/vlctest.app/Contents/MacOS/vlctest
Reason: image not found
Das Programm ist abgestürzt.

in the QT Creator project i have added the following:

Code: Select all

INCLUDEPATH += /Applications/VLC.app/Contents/MacOS/include LIBS += /Applications/VLC.app/Contents/MacOS/lib/libvlc.5.dylib LIBS += /Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib
but i think i use the wrong library.

when i build my application under windows i use the libvlc.a static library - but i dont have one for the mac (i think here i have to use somwthing like libvlc.lib)
i treid to compile the git version but without any success, so i couldnt get theses libs from here

i hipe somebody can give me a tip what lib i have to add to my project to get oit to run (it is the QT vlc code fomr this page waht works under windows and linux)

with regards

georg

Re: libvlc for mac os QT Creator - general newbie problem

Posted: 20 Mar 2011 17:04
by xylosper
.dylib correspons to .dll of windows.
You can link to shared library with -L and -l option, for instance,
LIBS += -L/Applications/VLC.app/Contents/MacOS/lib -lvlc
For more detail usage, read the document for qmake.

Re: libvlc for mac os QT Creator - general newbie problem

Posted: 21 Mar 2011 17:32
by geostein8888
Hello,
finally i got this working, i made a copy of the lib and plugins folder into the build folder of the project.
now i have the problem, that i can't connecct the video to my QT Widget.
i dont use the VLCKit right now, i only use the standard libvlc

Code: Select all

libvlc_media_player_set_agl (_mp, _videoWidget->winId());
videowidget is embedded into my applications mainwindow

Georg