vlc-qt / vlc-qt

VLC-Qt - a simple library to connect Qt application with libVLC
https://vlc-qt.tano.si
Other
877 stars 345 forks source link

Compiling/Linking for Android "android_armv7" does not work #114

Open sk2212 opened 9 years ago

sk2212 commented 9 years ago

--(s.frenzel@frenzel master *)---------------------------------------------------------------------------------------------------------------------(~/SVN/vlc-qt)-- $ /usr/local/bin/cmake -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_CC_COMPILER=gcc-4.8

VLC-Qt: You are compiling VLC-Qt 0.90.0

-- Git Version Patch: 343b877 -- The C compiler identification is GNU 4.6.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/g++-4.8 -- Check for working CXX compiler: /usr/bin/g++-4.8 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done VLC-Qt: Build with Qt5 VLC-Qt: Build with OpenGL ES2: OFF VLC-Qt: Link with X11: OFF -- Found LibVLC include-dir path: /home/s.frenzel/SVN/android_vlc_new/android/vlc/include -- Found LibVLC library path:/home/s.frenzel/SVN/android_vlc_new/android/libvlc/libs/armeabi-v7a/libvlcjni.so -- Found LibVLCcore library path:/home/s.frenzel/SVN/android_vlc_new/android/libvlc/libs/armeabi-v7a/libvlcjni.so VLC-Qt: Build statically: OFF

VLC-Qt: Build tests: OFF

-- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

CMAKE_CC_COMPILER

-- Build files have been written to: /home/s.frenzel/SVN/vlc-qt


Did not really know what is needed for "LibVLC library" and "LibVLCcore" so I have used the compiled libVLC files for Android.


Compiling "vlc-qt" does work, but linking failes with following error:

[ 6%] Linking CXX shared library libVLCQtCore.so cd /home/s.frenzel/SVN/vlc-qt/src/core && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/Core.dir/link.txt --verbose=1 /usr/bin/g++-4.8 -fPIC -std=c++11 -shared -Wl,-soname,libVLCQtCore.so.0.90 -o libVLCQtCore.so.0.90.0 CMakeFiles/Core.dir/Audio.cpp.o CMakeFiles/Core.dir/Common.cpp.o CMakeFiles/Core.dir/Enums.cpp.o CMakeFiles/Core.dir/Error.cpp.o CMakeFiles/Core.dir/Instance.cpp.o CMakeFiles/Core.dir/Media.cpp.o CMakeFiles/Core.dir/MediaList.cpp.o CMakeFiles/Core.dir/MediaListPlayer.cpp.o CMakeFiles/Core.dir/MediaPlayer.cpp.o CMakeFiles/Core.dir/MetaManager.cpp.o CMakeFiles/Core.dir/Video.cpp.o CMakeFiles/Core.dir/VideoMemoryStream.cpp.o CMakeFiles/Core.dir/VideoFrame.cpp.o CMakeFiles/Core.dir/Equalizer.cpp.o CMakeFiles/Core.dir/Core_automoc.cpp.o /home/s.frenzel/Programs/Qt/Qt5.4.1/5.4/android_armv7/lib/libQt5Core.so /home/s.frenzel/SVN/android_vlc_new/android/libvlc/libs/armeabi-v7a/libvlcjni.so /home/s.frenzel/SVN/android_vlc_new/android/libvlc/libs/armeabi-v7a/libvlcjni.so -Wl,-rpath,/home/s.frenzel/SVN/android_vlc_new/android/libvlc/libs/armeabi-v7a:/home/s.frenzel/Programs/Qt/Qt5.4.1/5.4/android_armv7/lib: /home/s.frenzel/Programs/Qt/Qt5.4.1/5.4/android_armv7/lib/libQt5Core.so: could not read symbols: File in wrong format collect2: error: ld returned 1 exit status make[2]: * [src/core/libVLCQtCore.so.0.90.0] Fehler 1 make[2]: Verlasse Verzeichnis '/home/s.frenzel/SVN/vlc-qt' make[1]: * [src/core/CMakeFiles/Core.dir/all] Fehler 2 make[1]: Verlasse Verzeichnis '/home/s.frenzel/SVN/vlc-qt' make: *\ [all] Fehler 2

Can you help?

ntadej commented 9 years ago

You use desktop compiler, not the one for Android. Try running cmake from QtCreator.

Whu-wxy commented 4 years ago

Did you compile successfully? I tried to compile in QtCreator, but I also encountered "libQt5Core.so: could not read symbols: File in wrong format".

Is this because the version of g ++ or gcc in the system is different from the version of libQt*?

I checked the gcc version of libQt5Core, which is 4.9.x, so I installed gcc-4.9, but got the same result. Can you give some suggestions?