当前位置:网站首页>GCC cannot find the library file after specifying the link library path
GCC cannot find the library file after specifying the link library path
2022-07-03 15:15:00 【alw_ one hundred and twenty-three】
Problem description :makefile The path and name of the library have been specified in , No error is reported during compilation , But when the program runs, it will report an error that the library file cannot be found . 

terms of settlement :
gcc Medium plus -Wl,-rpath=. 
Why? ?
gcc -L Option specifies the dynamic library path when linking , Compile and pass , But the path cannot be found during execution ;
gcc -Wl -rpath Option specifies the path at run time , The runtime finds the dynamic library according to the specified path ;
In other words, when dealing with dynamic link libraries 2 A path : Link time path and run time path ,2 The two paths are separate .
边栏推荐
- Puppet自动化运维排错案例
- Dataframe returns the whole row according to the value
- redis单线程问题强制梳理门外汉扫盲
- Neon global and Chinese markets 2022-2028: Research Report on technology, participants, trends, market size and share
- Byte practice plane longitude 2
- 什么是Label encoding?one-hot encoding ,label encoding两种编码该如何区分和使用?
- [pytorch learning notes] transforms
- Zero copy underlying analysis
- Puppet automatic operation and maintenance troubleshooting cases
- 视觉上位系统设计开发(halcon-winform)-3.图像控件
猜你喜欢

Kubernetes帶你從頭到尾捋一遍

What is machine reading comprehension? What are the applications? Finally someone made it clear

Matplotlib drawing label cannot display Chinese problems

Pytoch deep learning and target detection practice notes

Halcon与Winform学习第一节

Troubleshooting method of CPU surge

Characteristics of MySQL InnoDB storage engine -- Analysis of row lock

【Transform】【实践】使用Pytorch的torch.nn.MultiheadAttention来实现self-attention

Reentrantlock usage and source code analysis

Yolov5系列(一)——網絡可視化工具netron
随机推荐
【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器
官网MapReduce实例代码详细批注
Kubernetes 进阶训练营 Pod基础
[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller
Reentrantlock usage and source code analysis
Tencent internship interview sorting
Using Tengine to solve the session problem of load balancing
Characteristics of MySQL InnoDB storage engine -- Analysis of row lock
Using TCL (tool command language) to manage Tornado (for VxWorks) can start the project
什么是embedding(把物体编码为一个低维稠密向量),pytorch中nn.Embedding原理及使用
XWiki Installation Tips
Using multipleoutputs to output multiple files in MapReduce
Finally, someone explained the financial risk management clearly
The first character of leetcode sword offer that only appears once (12)
开启 Chrome 和 Edge 浏览器多线程下载
socket. IO build distributed web push server
Global and Chinese markets for sterile packaging 2022-2028: Research Report on technology, participants, trends, market size and share
Zero copy underlying analysis
Puppet自动化运维排错案例
什么是Label encoding?one-hot encoding ,label encoding两种编码该如何区分和使用?