cmake 如何正确安装开源uEye应用程序缺少的库

axr492tv  于 2023-11-19  发布在  其他
关注(0)|答案(1)|浏览(225)

我需要构建iDS的SimpleStreamer应用程序
我有以下结构的档案:

.
├── bin
│   └── ueye_streamer
├── doc
.   .
.   .
│   └── ueye__stream_8h_source.html
├── include
│   └── ueye_stream.h
├── lib
│   ├── ffmpeg
│   │   ├── libavcodec.so
│   │   ├── libavcodec.so.56
│   │   ├── libavcodec.so.56.60.100
│   │   ├── libavdevice.so
│   │   ├── libavdevice.so.56
│   │   ├── libavdevice.so.56.4.100
│   │   ├── libavfilter.so
│   │   ├── libavfilter.so.5
│   │   ├── libavfilter.so.5.40.101
│   │   ├── libavformat.so
│   │   ├── libavformat.so.56
│   │   ├── libavformat.so.56.40.101
│   │   ├── libavutil.so
│   │   ├── libavutil.so.54
│   │   ├── libavutil.so.54.31.100
│   │   ├── libswresample.so
│   │   ├── libswresample.so.1
│   │   ├── libswresample.so.1.2.101
│   │   ├── libswscale.so
│   │   ├── libswscale.so.3
│   │   └── libswscale.so.3.1.101
│   ├── libueye_stream.so -> libueye_stream.so.2
│   ├── libueye_stream.so.2 -> libueye_stream.so.2.0
│   ├── libueye_stream.so.2.0
│   └── live555
│       ├── libBasicUsageEnvironment.so
│       ├── libBasicUsageEnvironment.so.1
│       ├── libBasicUsageEnvironment.so.1.0.0
│       ├── libgroupsock.so
│       ├── libgroupsock.so.8
│       ├── libgroupsock.so.8.1.0
│       ├── libliveMedia.so
│       ├── libliveMedia.so.52
│       ├── libliveMedia.so.52.0.4
│       ├── libUsageEnvironment.so
│       ├── libUsageEnvironment.so.3
│       └── libUsageEnvironment.so.3.1.0
├── licenses
│   ├── thirdparty_copyrights.txt
│   ├── thirdparty_licenses.txt
│   └── thirdparty_rights.txt
├── README.txt
├── src
│   ├── SimpleStreamer
│   │   ├── build
│   │   ├── CMakeLists.txt
│   │   ├── libueye_stream.so
│   │   ├── libueye_stream.so.2.0
│   │   ├── main.cpp
│   │   └── ueye_stream.h
│   └── uEyeStreamer
│       ├── build
│       ├── CMakeLists.txt
│       ├── res
│       ├── src
│       ├── streamer.qrc
│       ├── streamer.rc.in
│       └── uEye_Streamer.ico
└── ueye_streamer.sh

字符串
以下是SimpleStreamer的CMakeLists.txt的内容:

project(SimpleStream)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)

add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} ueye_api ueye_stream)


我将项目的常用libinclude文件夹复制到系统范围的libinclude

sudo cp include/ueye_stream.h /usr/local/include/
sudo cp lib/libueye_stream.so.2.0 /usr/local/lib/


我以与/usr/local/lib和项目的lib相同的方式创建了符号链接:

lrwxrwxrwx 1 olga olga     19 июн 21  2016 libueye_stream.so -> libueye_stream.so.2
lrwxrwxrwx 1 olga olga     21 июн 21  2016 libueye_stream.so.2 -> libueye_stream.so.2.0
-rwxr-xr-x 1 olga olga 151018 июн 21  2016 libueye_stream.so.2.0


我做了sudo ldconfig没有任何错误。
我从SimpleStreamer的build目录中做了cmake ..

-- Configuring done
-- Generating done
-- Build files have been written to: /home/olga/camera/ueye/ueye_stream/ueye_stream_x64/src/SimpleStreamer/build


但是当我继续到make阶段时,我得到了很多错误:

olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/src/SimpleStreamer/build$ make
[ 50%] Linking CXX executable SimpleStream
/usr/bin/ld: warning: libliveMedia.so.52, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgroupsock.so.8, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libBasicUsageEnvironment.so.1, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libUsageEnvironment.so.3, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavcodec.so.56, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavfilter.so.5, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavutil.so.54, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libswscale.so.3, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavformat.so.56, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::doStopGettingFrames()'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_decode_video2@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isServerMediaSession() const'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::afterGetting(FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `BasicUsageEnvironment::createNew(TaskScheduler&)'
//usr/local/lib/libueye_stream.so: undefined reference to `avpicture_get_size@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::setStreamSourceDuration(FramedSource*, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_free@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSession::addSubsession(ServerMediaSubsession*)'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::~FramedSource()'
//usr/local/lib/libueye_stream.so: undefined reference to `typeinfo for OnDemandServerMediaSubsession'
//usr/local/lib/libueye_stream.so: undefined reference to `av_frame_free@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStream(unsigned int, void*, char*&, char*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_get_context_defaults3@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::startStream(unsigned int, void*, void (*)(void*), void*, unsigned short&, unsigned int&, void (*)(void*, unsigned char), void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSubsession::testScaleFactor(float&)'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::JPEGVideoSource(UsageEnvironment&)'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::~JPEGVideoSource()'
//usr/local/lib/libueye_stream.so: undefined reference to `H264VideoRTPSink::createNew(UsageEnvironment&, Groupsock*, unsigned char)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isRTSPClient() const'
//usr/local/lib/libueye_stream.so: undefined reference to `RTSPServer::rtspURL(ServerMediaSession const*, int) const'
//usr/local/lib/libueye_stream.so: undefined reference to `GenericMediaServer::addServerMediaSession(ServerMediaSession*)'
//usr/local/lib/libueye_stream.so: undefined reference to `sws_freeContext@LIBSWSCALE_3'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getCurrentNPT(void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::restartInterval()'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isRTPSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::deleteStream(unsigned int, void*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getRTPSinkandRTCP(void*, RTPSink const*&, RTCPInstance const*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isDVVideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `Port::Port(unsigned short)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_new_packet@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getStreamParameters(unsigned int, unsigned int, Port const&, Port const&, int, unsigned char, unsigned char, unsigned int&, unsigned char&, unsigned char&, Port&, Port&, void*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isMPEG1or2VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::sdpLines()'
//usr/local/lib/libueye_stream.so: undefined reference to `BasicTaskScheduler::createNew(unsigned int)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStreamSource(FramedSource*, double&, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::maxFrameSize() const'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_open2@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::~OnDemandServerMediaSubsession()'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isAMRAudioSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isH265VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::nullSeekStream(unsigned int, void*, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_frame_alloc@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `avpicture_fill@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::OnDemandServerMediaSubsession(UsageEnvironment&, unsigned char, unsigned short, unsigned char)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::createGroupsock(in_addr const&, Port)'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSubsession::getAbsoluteTimeRange(char*&, char*&) const'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSession::createNew(UsageEnvironment&, char const*, char const*, char const*, unsigned char, char const*)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isRTCPInstance() const'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoRTPSink::createNew(UsageEnvironment&, Groupsock*)'
//usr/local/lib/libueye_stream.so: undefined reference to `GenericMediaServer::deleteServerMediaSession(ServerMediaSession*)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_free_packet@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSubsession::duration() const'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isRTSPServer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `av_register_all@LIBAVFORMAT_56'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::getAttributes() const'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_encode_video2@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `avformat_new_stream@LIBAVFORMAT_56'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::isFramedSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `H264VideoStreamDiscreteFramer::createNew(UsageEnvironment&, FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isSink() const'
//usr/local/lib/libueye_stream.so: undefined reference to `typeinfo for JPEGVideoSource'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::setStreamSourceScale(FramedSource*, float)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStream(unsigned int, void*, double&, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `OutPacketBuffer::maxSize'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::close(Medium*)'
//usr/local/lib/libueye_stream.so: undefined reference to `UsageEnvironment::reclaim()'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::MIMEtype() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getAuxSDPLine(RTPSink*, FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_close@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `av_init_packet@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::closeStreamSource(FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isMPEG4VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::pauseStream(unsigned int, void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isJPEGVideoSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_find_decoder@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `av_malloc@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isMediaSession() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::createRTCP(Groupsock*, unsigned int, unsigned char const*, RTPSink*)'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_alloc_context3@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_find_encoder@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::setStreamScale(unsigned int, void*, float)'
//usr/local/lib/libueye_stream.so: undefined reference to `sws_getContext@LIBSWSCALE_3'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::isJPEGVideoSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isH264VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getStreamSource(void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::FramedSource(UsageEnvironment&)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_log_set_level@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStreamSource(FramedSource*, char*&, char*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `RTSPServer::createNew(UsageEnvironment&, Port, UserAuthenticationDatabase*, unsigned int)'
//usr/local/lib/libueye_stream.so: undefined reference to `typeinfo for FramedSource'
//usr/local/lib/libueye_stream.so: undefined reference to `sws_scale@LIBSWSCALE_3'
collect2: error: ld returned 1 exit status
CMakeFiles/SimpleStream.dir/build.make:94: recipe for target 'SimpleStream' failed
make[2]: *** [SimpleStream] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/SimpleStream.dir/all' failed
make[1]: *** [CMakeFiles/SimpleStream.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2


在README.md项目的根目录中,我没有任何关于头文件和库的安装。

更新

olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ nm  -C -u libwx_baseu-2.8.so libueye_stream.so.2.0 
nm: 'libwx_baseu-2.8.so': No such file
libueye_stream.so.2.0:
                 U avcodec_alloc_context3@@LIBAVCODEC_56
                 .
                 .


系统版本:

olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ lsb_release -a
\No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:   bionic
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ uname -r
4.18.0-16-generic
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$


ldd的结果:

olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ ldd libueye_stream.so.2.0 
    linux-vdso.so.1 (0x00007fff56183000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f215cbb5000)
    libliveMedia.so.52 => not found
    libgroupsock.so.8 => not found
    libBasicUsageEnvironment.so.1 => not found
    libUsageEnvironment.so.3 => not found
    libavcodec.so.56 => not found
    libavfilter.so.5 => not found
    libavutil.so.54 => not found
    libswscale.so.3 => not found
    libavformat.so.56 => not found
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f215c82c000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f215c48e000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f215c276000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f215be85000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f215cfee000)

rmbxnbpk

rmbxnbpk1#

好的,在阅读了一些理论资料和“演绎思维”(c)之后,我找到了解决方法:
1.我创建了文件夹/usr/local/lib/ueye_olga
1.我从项目根lib及其子文件夹中复制了所有必要库到ueye_olga,请参见下面输出
1.我删除了不必要的文件,并用链接替换了它们(请参阅下面的说明)
1.我创建了/etc/ld.so.conf.d/ueye_olga.conf with path to the/usr/local/lib/ueye_olga ',请参见下面的内容。
1.我做了sudo ldconfig
1.我检查了libueye_stream.so是否正确链接(见下文)
1.我需要移动libueye_stream.so和它的链接文件夹了,我不知道为什么,看到下面的错误.
1.再次sudo ldconfig

  1. make工作正常.

/usr/local/lib/ueye_olga ':用户名和密码

olga@olga-MS-7758:/usr/local/lib$ ls -la ueye_olga/
total 15984
drwxr-xr-x 2 root root     4096 мар 22 15:13 .
drwxr-xr-x 7 root root    12288 мар 22 15:27 ..
lrwxrwxrwx 1 root root       16 мар 22 15:02 libavcodec.so -> libavcodec.so.56
lrwxrwxrwx 1 root root       23 мар 22 15:02 libavcodec.so.56 -> libavcodec.so.56.60.100
-rwxr-xr-x 1 root root 12294344 мар 22 14:35 libavcodec.so.56.60.100
lrwxrwxrwx 1 root root       17 мар 22 15:04 libavdevice.so -> libavdevice.so.56
lrwxrwxrwx 1 root root       23 мар 22 15:04 libavdevice.so.56 -> libavdevice.so.56.4.100
-rwxr-xr-x 1 root root    62384 мар 22 14:35 libavdevice.so.56.4.100
lrwxrwxrwx 1 root root       16 мар 22 15:05 libavfilter.so -> libavfilter.so.5
lrwxrwxrwx 1 root root       23 мар 22 15:04 libavfilter.so.5 -> libavfilter.so.5.40.101
-rwxr-xr-x 1 root root   129104 мар 22 14:35 libavfilter.so.5.40.101
lrwxrwxrwx 1 root root       17 мар 22 15:06 libavformat.so -> libavformat.so.56
lrwxrwxrwx 1 root root       24 мар 22 15:06 libavformat.so.56 -> libavformat.so.56.40.101
-rwxr-xr-x 1 root root  1152424 мар 22 14:35 libavformat.so.56.40.101
lrwxrwxrwx 1 root root       15 мар 22 15:07 libavutil.so -> libavutil.so.54
lrwxrwxrwx 1 root root       22 мар 22 15:07 libavutil.so.54 -> libavutil.so.54.31.100
-rwxr-xr-x 1 root root   336088 мар 22 14:35 libavutil.so.54.31.100
lrwxrwxrwx 1 root root       29 мар 22 15:11 libBasicUsageEnvironment.so -> libBasicUsageEnvironment.so.1
lrwxrwxrwx 1 root root       33 мар 22 15:10 libBasicUsageEnvironment.so.1 -> libBasicUsageEnvironment.so.1.0.0
-rw-r--r-- 1 root root    55839 мар 22 14:36 libBasicUsageEnvironment.so.1.0.0
lrwxrwxrwx 1 root root       17 мар 22 15:11 libgroupsock.so -> libgroupsock.so.8
lrwxrwxrwx 1 root root       21 мар 22 15:11 libgroupsock.so.8 -> libgroupsock.so.8.1.0
-rw-r--r-- 1 root root    74323 мар 22 14:36 libgroupsock.so.8.1.0
lrwxrwxrwx 1 root root       18 мар 22 15:12 libliveMedia.so -> libliveMedia.so.52
lrwxrwxrwx 1 root root       22 мар 22 15:12 libliveMedia.so.52 -> libliveMedia.so.52.0.4
-rw-r--r-- 1 root root  1395586 мар 22 14:36 libliveMedia.so.52.0.4
lrwxrwxrwx 1 root root       18 мар 22 15:12 libswresample.so -> libswresample.so.1
lrwxrwxrwx 1 root root       24 мар 22 15:12 libswresample.so.1 -> libswresample.so.1.2.101
-rwxr-xr-x 1 root root   108008 мар 22 14:35 libswresample.so.1.2.101
lrwxrwxrwx 1 root root       15 мар 22 15:13 libswscale.so -> libswscale.so.3
lrwxrwxrwx 1 root root       21 мар 22 15:13 libswscale.so.3 -> libswscale.so.3.1.101
-rwxr-xr-x 1 root root   549048 мар 22 14:35 libswscale.so.3.1.101
lrwxrwxrwx 1 root root       19 мар 22 14:12 libueye_stream.so -> libueye_stream.so.2
lrwxrwxrwx 1 root root       21 мар 22 14:11 libueye_stream.so.2 -> libueye_stream.so.2.0
-rwxr-xr-x 1 root root   151018 мар 22 14:29 libueye_stream.so.2.0
lrwxrwxrwx 1 root root       24 мар 22 15:13 libUsageEnvironment.so -> libUsageEnvironment.so.3
lrwxrwxrwx 1 root root       28 мар 22 15:13 libUsageEnvironment.so.3 -> libUsageEnvironment.so.3.1.0
-rw-r--r-- 1 root root    15809 мар 22 14:36 libUsageEnvironment.so.3.1.0

字符串

删除不必要的文件

如果不创建软链接,则会出现以下错误:
/sbin/ldconfig.真实的:/usr/local/lib/ueye_olga/libavcodec.so.56不是符号链接
其理由:
与库模块一样,libstdc通常可以安装为多个版本中的一个。通常只安装一个版本,其他可能的版本表示为指向已安装版本的符号链接。符号链接是指向已安装模块的另一个名称。例如,我安装了/usr/lib/libstdc++.so.6.0.10。我也安装了/usr/liblibstdc++。.so.6作为指向/usr/lib/libstdc++.so.6.0.10的符号链接,这样您就可以使用这两个名称访问libstdc++。
取自here

/etc/ld.so.conf.d/ueye_olga.conf

olga@olga-MS-7758:/usr/local/lib$ cat /etc/ld.so.conf.d/ueye_olga.conf
/usr/local/lib/ueye_olga

正确链接的ueye_stream

olga@olga-MS-7758:/usr/local/lib$ ldd libueye_stream.so
    linux-vdso.so.1 (0x00007ffe467a0000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb6c8879000)
    libliveMedia.so.52 => /usr/local/lib/ueye_olga/libliveMedia.so.52 (0x00007fb6c8565000)
    libgroupsock.so.8 => /usr/local/lib/ueye_olga/libgroupsock.so.8 (0x00007fb6c834b000)
    libBasicUsageEnvironment.so.1 => /usr/local/lib/ueye_olga/libBasicUsageEnvironment.so.1 (0x00007fb6c8141000)
    libUsageEnvironment.so.3 => /usr/local/lib/ueye_olga/libUsageEnvironment.so.3 (0x00007fb6c7f3e000)
    libavcodec.so.56 => /usr/local/lib/ueye_olga/libavcodec.so.56 (0x00007fb6c6ad1000)
    libavfilter.so.5 => /usr/local/lib/ueye_olga/libavfilter.so.5 (0x00007fb6c68b2000)
    libavutil.so.54 => /usr/local/lib/ueye_olga/libavutil.so.54 (0x00007fb6c664c000)
    libswscale.so.3 => /usr/local/lib/ueye_olga/libswscale.so.3 (0x00007fb6c63be000)
    libavformat.so.56 => /usr/local/lib/ueye_olga/libavformat.so.56 (0x00007fb6c60a5000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb6c5d1c000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb6c597e000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb6c5766000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb6c5375000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fb6c8cb2000)
    libswresample.so.1 => /usr/local/lib/ueye_olga/libswresample.so.1 (0x00007fb6c515b000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb6c4f3e000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb6c4d36000)

  • 不是,libueye_stream.so与软链接移动到/usr/local/lib。*
    make成功
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/src/SimpleStreamer/build$ make
[ 50%] Linking CXX executable SimpleStream
[100%] Built target SimpleStream

相关问题