Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Vlc-Qt Static Build
Forum Updated to NodeBB v4.3 + New Features

Vlc-Qt Static Build

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 375 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jidaprano
    wrote on last edited by
    #1

    Hello,
    I am trying to statically build a Qt program that uses Vlc-Qt. I statically compiled Vlc-Qt with the -DSTATIC=ON compiler flag, and it successfully builds with the following output:

    -- Building VLC-Qt 1.2.0
    -- Git revision: 9b2f561
    -- The C compiler identification is GNU 11.4.0
    -- The CXX compiler identification is GNU 11.4.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Build statically: ON
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
    -- Found Threads: TRUE
    -- Using Qt 5.15.14
    -- Installing to system QML import path: OFF
    -- Found LibVLC include-dir path: /usr/include
    -- Found LibVLC library path:/usr/lib/x86_64-linux-gnu/libvlc.so
    -- Found LibVLCcore library path:/usr/lib/x86_64-linux-gnu/libvlccore.so
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/exhibits/vlc-qt/build
    

    Unfortunately, after I make and install Vlc-Qt, when I try to run the Qt project that uses it, I get the following errors:

    Instance.cpp👎 error: undefined reference to libvlc_new' :-1: error: Instance.cpp:(.text+0x4e3): undefined reference to libvlc_log_set'
    

    and a series of similar ones. Am I incorrectly linking libvlc to Vlc-qt?
    I'm aware this is probably not the optimal place to ask Vlc-Qt questions but all original vlc-qt forums are pretty dead, so I'd appreciate any guidance.
    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You forgot to link against VLC lib itself. The fact that VLC-Qt is static does not make its dependencies static as well.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      3
      • SGaistS SGaist

        Hi and welcome to devnet,

        You forgot to link against VLC lib itself. The fact that VLC-Qt is static does not make its dependencies static as well.

        J Offline
        J Offline
        jidaprano
        wrote on last edited by
        #3

        @SGaist
        Thanks for responding, your posts have helped me immensely over the past few months.
        How would I go about statically linking with libvlc itself? Do I need to statically build vlc?

        SGaistS 1 Reply Last reply
        0
        • J jidaprano

          @SGaist
          Thanks for responding, your posts have helped me immensely over the past few months.
          How would I go about statically linking with libvlc itself? Do I need to statically build vlc?

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Yes, if you want a library to be 100% static, then all its dependencies shall also be built statically.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved