qmake :构建没有符号链接和“lib”的库前缀
我在我的应用程序中需要一个非常简单的机制,其中我的项目被构建为共享库“.so”或“.dll”,但我想要的是:
ExampleAppOne.so
我得到:
libExampleAppOne.so -> libExampleAppOne.so.1.0.0
libExampleAppOne.so.1 -> libExampleAppOne.so.1.0.0
libExampleAppOne.so.1.0 -> libExampleAppOne.so.1.0.0
我什至不需要“lib”前缀。在 .pro 文件中,我所能做的就是更改 INSTALLS 变量(这是因为我的第三个要求是在特定目录中构建库)。
另外,我还有第四个相关要求:当我要求 QLibrary 加载库时,我希望它专门搜索非常特定路径中的库以及与为其指定的确切名称相匹配的库。没有“lib”前缀匹配,没有“版本字符串”搜索,没有查看 LD_LIBRARY_PATH...
任何帮助都是值得赞赏的。
问候, 罗汉
I require a very simple mechanism in my application, where my project is built as a shared library '.so' or '.dll', but what I want is:
ExampleAppOne.so
I get:
libExampleAppOne.so -> libExampleAppOne.so.1.0.0
libExampleAppOne.so.1 -> libExampleAppOne.so.1.0.0
libExampleAppOne.so.1.0 -> libExampleAppOne.so.1.0.0
I don't even want the 'lib' prefix. In the .pro file, all I can do is change the INSTALLS variable (that is because my third requirement IS that the library be built in a specific directory).
Also, I have a fourth, related requirement: When I ask QLibrary to load the library, I want it to specifically search for a library in a very specific path and a library that matches the EXACT name given to it. No 'lib' prefix matching, no 'version string' searching, no looking into LD_LIBRARY_PATH...
Any help is appreciated.
Regards,
rohan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将以下内容添加到您的 .pro 文件中
add the following to you .pro file
将
plugin
添加到CONFIG
变量应该会禁用版本控制和生成库的符号链接。但我不知道禁用
lib
前缀的简单方法。您可能想深入研究提供的 QMake 规范文件以了解默认处理是如何实现的。Adding
plugin
to theCONFIG
variable should disable versioning and the generation of symbolic links to the library.I don't know of a simple way to disable the
lib
prefix though. You way want to dig into the provided QMake spec files to see how the default processing is implemented.