当前位置:网站首页>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 .
边栏推荐
- Summary of concurrent full knowledge points
- Centos7 deployment sentry redis (with architecture diagram, clear and easy to understand)
- [Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
- Jvm-06-execution engine
- 【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》
- Incluxdb2 buckets create database
- el-switch 赋值后状态不变化
- Global and Chinese markets of AC electromechanical relays 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese market of Bus HVAC systems 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese market of air cargo logistics 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

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

Jvm-02-class loading subsystem

B2020 points candy

视觉上位系统设计开发(halcon-winform)-4.通信管理

There are links in the linked list. Can you walk three steps faster or slower

【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现

【pytorch学习笔记】Datasets and Dataloaders

What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding

北京共有产权房出租新规实施的租赁案例

【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器
随机推荐
Besides lying flat, what else can a 27 year old do in life?
High quality workplace human beings must use software to recommend, and you certainly don't know the last one
Concurrency-02-visibility, atomicity, orderliness, volatile, CAS, atomic class, unsafe
Explanation of time complexity and space complexity
Jvm-06-execution engine
Leasing cases of the implementation of the new regulations on the rental of jointly owned houses in Beijing
Global and Chinese market of trimethylamine 2022-2028: Research Report on technology, participants, trends, market size and share
Incluxdb2 buckets create database
App global exception capture
TPS61170QDRVRQ1
Leetcode the smallest number of the rotation array of the offer of the sword (11)
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
Class part2
Global and Chinese markets for flexible chips 2022-2028: Research Report on technology, participants, trends, market size and share
Puppet automatic operation and maintenance troubleshooting cases
Redis cache penetration, cache breakdown, cache avalanche solution
Apache ant extension tutorial
SQL server安装位置改不了
App全局异常捕获
406. Reconstruct the queue according to height