qt LIBS -Wl
时间: 2023-09-27 07:12:47 浏览: 149
keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm下载
引用和给出了在不同操作系统下设置Qt LIBS的示例。在Linux下,可以使用`-Wl,-rpath`选项指定库文件的查找位置,并使用`-Wl,-Bsymbolic`选项进行符号绑定。而在Mac下,应该使用`-Wl,-rpath`选项指定库文件的查找位置,但不需要加上`-Wl,-Bsymbolic`选项。因为Mac不支持`-Bsymbolic`选项。所以,正确的设置应该是:
Linux下:
```
QMAKE_LFLAGS_RELEASE = -Wl,-rpath=$$PWD/../../Release/libs -Wl,-Bsymbolic
QMAKE_LFLAGS_DEBUG = -Wl,-rpath=$$PWD/../../Release/libs -Wl,-Bsymbolic
```
Mac下:
```
QMAKE_LFLAGS_RELEASE = -Wl,-rpath,$$PWD/../../Release/libs
QMAKE_LFLAGS_DEBUG = -Wl,-rpath,$$PWD/../../Release/libs
```<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [Mac下QT编译输出路径错误:ld unknown option ...](https://blog.csdn.net/huihut/article/details/69400286)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文