Dll 使用MinGw在Windows上生成Mlt时出错。未定义的引用dlsym dlclose dlopen dlerror dlclose
在使用MinGw在windows上构建MLT框架时,我遇到了一些问题。我试着按照上面的指示去做。我完成了每一步,直到“构建”这一步。 这是“构建”章节的第7步所产生的结果:Dll 使用MinGw在Windows上生成Mlt时出错。未定义的引用dlsym dlclose dlopen dlerror dlclose,dll,build,compiler-errors,mlt,Dll,Build,Compiler Errors,Mlt,在使用MinGw在windows上构建MLT框架时,我遇到了一些问题。我试着按照上面的指示去做。我完成了每一步,直到“构建”这一步。 这是“构建”章节的第7步所产生的结果: $ ./configure --prefix=$HOME/build --enable-gpl --disable-decklink Configuring framework: Configuring modules: Configuring modules/avformat: - libavformat not
$ ./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个“构建”步骤时,名为“全部安装”,构建失败,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上找到。我想知道为什么编译器看不到它,有什么办法可以让它工作吗?问题是,我猜dlfcn没有提供.pc文件,pkg配置将使用该文件查找cflags和libs。
我相信您已正确安装SDL。您可以模仿SDL.pc(通常在/usr/local/lib/pkg config/下),自己编写一个dl.pc。我猜您的平台没有被正确检测到。尝试将目标操作系统指定为配置参数:
./configure --target-os=MinGW
嗨,谢谢你的回答。我想问一下我应该把SDL.pc文件放在哪里?我把它放在C:\MinGW\msys\1.0\home\Benas\lib\pkgconfig\SDL.pc中,可以吗?该文件的内容前缀为=/home/Benas,版本设置为version:1.2.15。那“dl.pc”呢?你是说“sdl.pc”吗?它仍然抛出相同的错误。我需要将sdl.pc文件放在何处以及它应该是什么样子?sdl.pc的位置和内容都可以。(如果您从源代码处编译并安装sdl,也会安装sdl.pc。您可以稍后再试。)我指的是“dl.pc”的“dlfcn.pc”。经过进一步调查,我认为dlfcn.pc不是你案件的关键问题。我们把它放在一边吧。对不起。我想到的另一件事是,您可能会错过“libdl.dll.a”。将/mingw/lib/libdl.dll.a复制到构建目录,就像复制libdl.dll一样。然后试一试。我将“libdl.dll.a”从C:\MinGW\lib\复制到C:\MinGW\msys\1.0\home\Benas\build\中,但仍然出现相同的错误。很抱歉,我犯了一个错误。目标文件夹应为lib而不是build。它应该是副本C:\MinGW\lib\libdl*C:\MinGW\msys\1.0\home\Benas\lib。然后设置LDFLAGS,只需在bash中“exportldflags=-L/home/Benas/lib”。它仍然不起作用,我想我们需要找到其他人来帮助:-)问题仍然存在。无论如何,谢谢你的帮助。我在MLT的邮件列表中发布了同样的问题,也许有人会知道答案。