Проблемы с компоновщиком Windows QT GStreamer - PullRequest
0 голосов
/ 04 октября 2018

Я пытаюсь скомпилировать и запустить пример qml-sink, который предоставляется внутри gstreamer-good-plugin ( QT Example ).Но в настоящее время я получаю много неопределенных ошибок ссылок во время компиляции.Кажется, что компоновщик неправильно связывает библиотеки.Я проверил список связанных библиотек и, с моей точки зрения, перечислены все необходимые библиотеки.

Например, gst_object_ref, gst_init, ... не определены.

Моя настройка:

  • Windows 10
  • Qt 5.11
  • Gstreamer 1.0
  • Gstremer devel 1.0
  • Плагин Gstreamer хорошо

Установленная версия GStreamer отсюда: GStreamer Скачать => gstreamer-1.0-devel-x86_64-1.14.3.msi и gstreamer-1.0-x86_64-1.14.3.msi

Может кто-нибудь пожалуйстапомогите, как я могу решить эту проблему?

Ошибка:

"C:\Program Files\CMake\bin\cmake.exe" --build . --target all
"C:\Program Files\CMake\bin\cmake.exe" -HC:\gst-plugins-good-1.14.4\tests\examples\qt\qmlsink -BC:\gst-plugins-good-1.14.4\tests\examples\qt\build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start C:\gst-plugins-good-1.14.4\tests\examples\qt\build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe\CMakeFiles C:\gst-plugins-good-1.14.4\tests\examples\qt\build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe\CMakeFiles\progress.marks
D:/Qt/Tools/mingw530_32/bin/mingw32-make.exe -f CMakeFiles\Makefile2 all
mingw32-make.exe[1]: Entering directory 'C:/gst-plugins-good-1.14.4/tests/examples/qt/build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe'
D:/Qt/Tools/mingw530_32/bin/mingw32-make.exe -f CMakeFiles\qml-example.dir\build.make CMakeFiles/qml-example.dir/depend
mingw32-make.exe[2]: Entering directory 'C:/gst-plugins-good-1.14.4/tests/examples/qt/build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe'
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_depends "MinGW Makefiles"                         
 C:\gst-plugins-good-1.14.4\tests\examples\qt\qmlsink C:\gst-plugins-good-1.14.4\tests\examples\qt\qmlsink C:\gst-plugins-good-1.14.4\tests\examples\qt\build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe 
 C:\gst-plugins-good-1.14.4\tests\examples\qt\build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe C:\gst-plugins-good-1.14.4\tests\examples\qt\build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe\CMakeFiles\qml-example.dir\DependInfo.cmake --color=
mingw32-make.exe[2]: Leaving directory 'C:/gst-plugins-good-1.14.4/tests/examples/qt/build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe'
D:/Qt/Tools/mingw530_32/bin/mingw32-make.exe -f CMakeFiles\qml-example.dir\build.make CMakeFiles/qml-example.dir/build
mingw32-make.exe[2]: Entering directory 'C:/gst-plugins-good-1.14.4/tests/examples/qt/build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe'
[ 25%] Linking CXX executable qml-example.exe
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\qml-example.dir\link.txt --verbose=1
"C:\Program Files\CMake\bin\cmake.exe" -E remove -f CMakeFiles\qml-example.dir/objects.a
D:\Qt\Tools\mingw530_32\bin\ar.exe cr CMakeFiles\qml-example.dir/objects.a @CMakeFiles\qml-example.dir\objects1.rsp
D:\Qt\Tools\mingw530_32\bin\g++.exe    -Wl,--whole-archive CMakeFiles\qml-example.dir/objects.a -Wl,--no-whole-archive  -o qml-example.exe -Wl,--out-implib,libqml-example.dll.a -Wl,--major-image-version,0,--minor-image-version,0 
@CMakeFiles\qml-example.dir\linklibs.rsp
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x2b): undefined reference to `gst_object_ref'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x87): undefined reference to `gst_object_unref'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0xa7): undefined reference to `operator delete(void*)'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0xc8): undefined reference to `operator delete(void*)'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0xf3): undefined reference to `gst_element_set_state'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x150): undefined reference to `gst_init'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x17d): undefined reference to `gst_pipeline_new'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x194): undefined reference to `gst_element_factory_make'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x1ab): undefined reference to `gst_element_factory_make'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x1c2): undefined reference to `gst_element_factory_make'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x203): undefined reference to `g_assertion_message_expr'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x208): undefined reference to `gst_bin_get_type'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x217): undefined reference to `g_type_check_instance_cast'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x23e): undefined reference to `gst_bin_add_many'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x25f): undefined reference to `gst_element_link_many'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x37f): undefined reference to `g_assertion_message_expr'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x3a1): undefined reference to `g_object_set'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x3ad): undefined reference to `operator new(unsigned int)'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x3f6): undefined reference to `gst_element_set_state'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x401): undefined reference to `gst_object_unref'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x41e): undefined reference to `gst_deinit'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x467): undefined reference to `operator delete(void*)'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text$_ZN5QListIP7QObjectE13detach_helperEi[__ZN5QListIP7QObjectE13detach_helperEi]+0x8c): undefined reference to `__cxa_begin_catch'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text$_ZN5QListIP7QObjectE13detach_helperEi[__ZN5QListIP7QObjectE13detach_helperEi]+0xa3): undefined reference to `__cxa_rethrow'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.text$_ZN5QListIP7QObjectE13detach_helperEi[__ZN5QListIP7QObjectE13detach_helperEi]+0xaa): undefined reference to `__cxa_end_catch'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.rdata$_ZTI10SetPlaying[__ZTI10SetPlaying]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.rdata$_ZTI9QRunnable[__ZTI9QRunnable]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.eh_frame$_ZN5QListIP7QObjectED1Ev+0x13): undefined reference to `__gxx_personality_v0'
CMakeFiles\qml-example.dir/objects.a(main.cpp.obj):main.cpp:(.eh_frame$_ZN5QListIP7QObjectE13detach_helperEi+0x13): undefined reference to `__gxx_personality_v0'
CMakeFiles\qml-example.dir/objects.a(qrc_qml.cpp.obj):qrc_qml.cpp:(.eh_frame+0x8b): undefined reference to `__gxx_personality_v0'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: *** [qml-example.exe] Error 1
mingw32-make.exe[1]: *** [CMakeFiles/qml-example.dir/all] Error 2
CMakeFiles\qml-example.dir\build.make:112: recipe for target 'qml-example.exe' failed
mingw32-make.exe[2]: Leaving directory 'C:/gst-plugins-good-1.14.4/tests/examples/qt/build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe'
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/qml-example.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'C:/gst-plugins-good-1.14.4/tests/examples/qt/build-qmlsink-Desktop_Qt_5_11_1_MinGW_32bit-Vorgabe'
Makefile:82: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2

1 Ответ

0 голосов
/ 04 октября 2018

Похоже, вы строите для окон.Единственный способ, которым я скомпилировал плагин qml для Windows, это использование qmake с использованием предоставленного файла .pro.Мои эксперименты по компиляции с использованием набора инструментов mingw, предоставленного Qt, оказались безуспешными из-за несоответствия C ++ ABI между GStreamer и Qt.Я закончил тем, что вместо этого использовал MSVC / Visual Studio для компиляции.

Неопределенные ссылки на g_ / gst_, вероятно, означают, что в вашей системе неправильно настроен pkg-config.pkg-config.exe --modversion gstreamer-1.0 Должна ли выводиться версия установленного вами GStreamer.

Откуда вы скачали GStreamer?Какая версия GStreamer точно?Вы скачали бинарные файлы или сами скомпилировали?

...