我在我的C ++项目中使用Boost库。
我将它包含在PRO文件中,如下所示:
win32: INCLUDEPATH += C:/boost_1_60_0 win32: LIBS += "-LC:/boost_1_60_0/stage/lib/"但是,当我在终端(cmd)上运行以下命令来更新我的翻译文件时:
lupdate MyProject.pro它会在Boost库路径中搜索要更新的文件。
这是正常的吗? 如果不在Boost库路径中搜索,我该怎么办?
现在,当我需要运行lupdate命令时,我正在评论Boost包含行,但我不想每次需要更新我的翻译文件时都这样做。
Qt 5.3.2
提升1.6.0
I am using the Boost library in my C++ project.
I am including it in the PRO file like this:
win32: INCLUDEPATH += C:/boost_1_60_0 win32: LIBS += "-LC:/boost_1_60_0/stage/lib/"But, when I run the following command on the terminal (cmd) to update my translation file:
lupdate MyProject.proIt searchs for files in the Boost library path to update.
Is this normal? What can I do to not search in the Boost library path?
Now, I am commenting the Boost include lines when I need to run the lupdate command, but I don't want to do it every time I need to update my translation file.
Qt 5.3.2
Boost 1.6.0
最满意答案
错误报告( QTBUG-27936 )中有一个解决方法,涉及.pro项目中的TR_EXCLUDE选项。 它用于告诉lupdate排除某些文件。 我测试了Qt 5.6和5.8,它按预期工作。 这里有我的.pro文件的摘录:
INCLUDEPATH += /Users/user/libs/boost TR_EXCLUDE += /Users/user/libs/boost/*以前的答案这是以前的答案,我无法确认,而且它恰好是错误的。 我把它放在这里,所以它保存在文件中。 错误报告( QTBUG-27936 )中有一个解决方法,它包括预编译头中的所有Boost库,因为lupdate不会查看它。
There is a workaround in the bug report (QTBUG-27936), involving the TR_EXCLUDE option in the .pro project. It is used to tell lupdate to exclude certain files. I tested with Qt 5.6 and 5.8 and it worked as expected. Here there is the extract of my .pro file:
INCLUDEPATH += /Users/user/libs/boost TR_EXCLUDE += /Users/user/libs/boost/*PREVIOUS ANSWER This is the previous answer, which I couldn't confirm and it happens to be wrong. I'm letting it here so it's kept documented. There is a workaround in the bug report (QTBUG-27936), which is to include all Boost libraries in the precompiled header, since lupdate doesn't look at it.
更多推荐
发布评论