使用MinGw在Windows上构建Mlt时出错。未定义的引用dlsym dlclose dlopen dlerror dlclose

时间:2014-04-04 17:20:46

标签: dll build compiler-errors mlt

我在使用MinGw在Windows上构建MLT框架时遇到了一些问题。我尝试按照http://www.mltframework.org/bin/view/MLT/WindowsBuild上的说明操作。我完成了每一步,直到称为“Build”的步骤。 这就是“构建”章节的第7步产生的结果:

 $ ./configure --prefix=$HOME/build --enable-gpl --disable-decklink
 Configuring framework:
 Configuring modules:
 Configuring modules/avformat:
 - libavformat not found: disabling
 Configuring modules/core:
 Configuring modules/dv:
 - libdv not found: disabling
 Configuring modules/feeds:
 Configuring modules/frei0r:
 Package frei0r was not found in the pkg-config search path.
 Perhaps you should add the directory containing `frei0r.pc'
 to the PKG_CONFIG_PATH environment variable
 No package 'frei0r' found
 Configuring modules/gtk2:
 - GTK2 components not found: disabling
 Configuring modules/jackrack:
 - jackrack not found: disabling
 - xml2 not found: disabling jackrack
 - ladspa not found; disabling
 Configuring modules/kdenlive:
 Configuring modules/kino:
 - does not build on OS X or Windows: disabling
 Configuring modules/linsys:
 - does not build on OS X or Windows: disabling
 Configuring modules/lumas:
 Configuring modules/motion_est:
 Configuring modules/normalize:
 Configuring modules/oldfilm:
 Configuring modules/opengl:
 - movit not found: disabling
 Configuring modules/plus:
 Configuring modules/plusgpl:
 Configuring modules/qt:
 - Qt not found - disabling
 ./configure: line 150: kde4-config: command not found
 Configuring modules/resample:
 - libsamplerate not found: disabling
 Configuring modules/rtaudio:
 Configuring modules/sdl:
 Configuring modules/sox:
 - sox not found: disabling
 Configuring modules/swfdec:
 - swfdec not found: disabling
 Configuring modules/vid.stab:
 - vid.stab not found: disabling
 Configuring modules/videostab:
 Configuring modules/vmfx:
 Configuring modules/vorbis:
 - ogg vorbis not found: disabling
 Configuring modules/xine:
 Configuring modules/xml:
 - xml2 not found: disabling xml module
 Configuring mlt++:
 Configuring swig:
 GPLv2 license used; GPLv3 components disabled

看起来即使在配置阶段,一些库也缺失了,我不确定这些缺少的库是否对任务至关重要......

当尝试进行第8次“构建”步骤时,名为“make all install”的构建失败并且MinGw吐出错误:

 C:\MinGW\msys\1.0\home\Benas\src\mlt\src\framework/mlt_repository.c:101: undefined reference to `dlsym'
 C:\MinGW\msys\1.0\home\Benas\src\mlt\src\framework/mlt_repository.c:109: undefined reference to `dlclose'
 C:\MinGW\msys\1.0\home\Benas\src\mlt\src\framework/mlt_repository.c:97: undefined reference to `dlopen'
 C:\MinGW\msys\1.0\home\Benas\src\mlt\src\framework/mlt_repository.c:118: undefined reference to `dlerror'
 C:\MinGW\msys\1.0\home\Benas\src\mlt\src\framework/mlt_repository.c:113: undefined reference to `dlclose'
 collect2.exe: error: ld returned 1 exit status
 make[1]: *** [libmlt-6.dll] Error 1
 make[1]: Leaving directory `/home/Benas/src/mlt/src/framework'
 make: *** [all] Error 1

这一定是因为编译器找不到dlfcn.dll。我从教程完成了“dlfcn-win32”步骤,可以在C:\ MinGW \ bin和C:\ MinGW \ msys \ 1.0 \ home \ Benas \ build中找到该库。我想知道为什么编译器看不到它,有什么方法可以使它工作吗?

2 个答案:

答案 0 :(得分:0)

问题是,我猜,dlfcn没有提供.pc文件,pkg-config将用它来查找cflags和libs。 我相信你已经正确安装了SDL。你可以模仿SDL.pc(通常在/ usr / local / lib / pkg-config /下)并写一个自己的dl.pc。

答案 1 :(得分:0)

我猜您的平台未被正确检测到。尝试将目标操作系统指定为配置参数:

./configure --target-os=MinGW