Coder Social home page Coder Social logo

Comments (3)

zhaojunliing avatar zhaojunliing commented on May 24, 2024

//#cgo LDFLAGS : -L${SRCDIR} -Wl,-rpath,$ORIGIN -larcsoft_face_engine

这样可以解决

-Wl,-rpath,$ORIGIN 是一种设置运行时库搜索路径的方法。它告诉链接器(-Wl 用于传递选项给链接器)在可执行文件所在的目录中搜索共享库。$ORIGIN 是一个特殊的变量,表示可执行文件的目录。

后来测试了下libarcsoft_face_engine.so可以正常使用,但是libarcsoft_face.so的路径无法指定

root@test-System-Product-Name:/home# ldd /home/test/goproject/face-engine/libarcsoft_face.so 
        linux-vdso.so.1 (0x00007ffc07967000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4dcf952000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4dcf770000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4dcf621000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4dcf606000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4dcf414000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4dd2370000)
root@test-System-Product-Name:/home# ldd /home/test/goproject/face-engine/libarcsoft_face_engine.so
        linux-vdso.so.1 (0x00007ffc263cc000)
        libarcsoft_face.so => not found
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff2fc0cc000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff2fc0b1000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff2fbebf000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff2fbd70000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff2fc57a000)

libarcsoft_face.so 的路径好像时相对的,没办法指定

from face-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.