Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

VeinApiLinux.so /usr/bin/ld: cannot find -lVeinApiLinux



  • I am a noob of Qt and using a fingervein device for developing work.But I met a problem .I dont konw how to deal with.Here are some info,as follows:

    1,BUG :

    /usr/bin/ld: cannot find -lVeinApiLinux
    Makefile:234: recipe for target 'mycom' failed
    collect2: error: ld returned 1 exit status
    make: *** [mycom] Error 1
    19:20:20: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project mycom (kit: Desktop Qt 5.7.1 GCC 64bit)
    When executing step "Make"
    2.MYCOM.PRO INFO

    VeinApiLinux .so

    INCLUDEPATH += /usr/lib
    LIBS += -L/usr/lib -lVeinApiLinux -ldl

    I appreciate it.


  • Moderators

    @Jack_Xuan Did you check if the library exists at that path ?



  • thx,hi ,h

    jack@jack:/etc$ ldd /usr/lib/VeinApiLinux
            linux-vdso.so.1 =>  (0x00007ffde9bdf000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1caacea000)
            /lib64/ld-linux-x86-64.so.2 (0x0000563fb169f000)
    jack@jack:/etc$ 
    
    
    
    


  • @p3c0 jack@jack:/etc$ ldd /usr/lib/VeinApiLinux
    linux-vdso.so.1 => (0x0000
    7ffde9bdf000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1caacea000)
    /lib64/ld-linux-x86-64.so.2 (0x0000563fb169f000)
    jack@jack:/etc$


  • Moderators

    @Jack_Xuan If VeinApiLinux is a library then it should be prefixed with lib and end with .so for dynamic and .a for static because that is what gcc expects. Try renaming it.



  • @p3c0 renaming VeinApiLinux.so->libfingervein.so.0.1 ? then ldconfig -v


  • Moderators

    @Jack_Xuan You are compiling against the library as

    LIBS += -L/usr/lib -lVeinApiLinux -ldl
    

    so the compiler expects a library as
    libVeinApiLinux.so


Log in to reply