lib(发布)或libd(调试),可以为我解决这个问题
lib (release) or libd (debug), can Qt resolve this for me?
在Plug&绘制示例.pro呈现以下内容:
LIBS = -Lplugins -lpnp_basictools
if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
mac:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)_debug
win32:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)d
}
在这种特殊情况下,在调试模式下,将d
附加到库名称,pnp_basictools
变为pnp_basictoolsd
。但它不能很好地扩展,即:
LIBS = -Lplugins -lplugin_1 -lplugin_2 -lplugin_3
if(!debug_and_release|build_pass):CONFIG(debug, debug|release)
win32:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)d
似乎没有将d
附加到plugin_2
和plugin_3
。
那么,我可以要求另一种方法在调试模式下将d
添加到库名称中吗?
这里也提到了这个问题。
$$member(X, pos)
返回列表变量X
的位置pos
处的项。因此,您找到的代码只处理该列表中的2个元素(0=>-Lplugins
和1=>-lpnp_basictools
)。
有一个for循环可以帮助您处理列表中的所有元素,但您可以"简单地"使用带有~=运算符的正则表达式:
win32:LIBS ~= s/-l(.*)/-l1d/g
相关文章:
- Project Euler问题4的错误解决方案
- 在java中解决这段代码时面临循环中的问题
- C++:Application.cpp中抛出了未解析的外部符号(解决方案在问题的末尾,供未来的读者参考)
- 难以理解某些人解决IOI问题的源代码
- 节俭并发:未解决的外部问题
- IpOpt拒绝解决不受约束的问题
- 错误LNK2005无法解决问题的解决方案
- 如何解决g++问题"internal compiler error: Illegal instruction min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MI
- 必须使用尾随返回类型的示例,因为无法用旧方法解决问题
- 如何解决问题"unresolved extenal symbol _DllMainCRTStartup@12"?
- 如何使用OlesetClipboard将我的COM对象放置在剪贴板上时解决问题
- 与C++析构函数相比,C#析构函数和GC并没有真正解决问题
- 没有调用函数,而是使用垃圾值.如何调用函数并解决问题
- 所有的组合算法和解决C++问题的一般方法
- 模板过载解决问题
- 对"pthread_key_create"的未定义引用;参数顺序不能解决问题
- 如何在使用cplex解决问题时设置间隙
- 选择一门语言学习真的很重要吗?他们都使用相似的技术来解决问题
- Iostream解决c++问题
- 递归是一件坏事吗?在递归似乎最有用的地方,是否有更清晰或更有效的方法来解决问题?