• Debian 12 linking issue with libvukan (undefined reference) with GNU C+

    From Johannes Krottmayer@21:1/5 to All on Thu Jan 16 21:30:02 2025
    Hello,

    I have encountered an issue when trying to compile and link against
    libvulkan with the GNU C++ compiler and GNU ld. Get 'undefined
    reference' errors on all library calls with:

    $ g++ -lvulkan -o test test.cpp

    The related package is installed on my system (also
    the development package libvulkan-dev):

    $ apt search libvulkan1
    Sorting... Done
    Full Text Search... Done
    libvulkan1/stable,now 1.3.239.0-1 amd64 [installed,automatic]
    Vulkan loader library

    $

    I have investigated the default search paths from GNU ld. But
    these paths seems to be okay.

    Compiling and linking with clang++/LLVM works with success.

    Has somebody noticed the same issue?

    It works with the GNU C++ compiler when I link the library directly,
    without the argument '-lvulkan'.

    Kind regards,

    Johannes K.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)