如何更改QtCreator中的C ++运行时库设置? [英] How to change the C++ Runtime Library setting in QtCreator?
问题描述
我是Qt的新手。我在Visual Studio 2010中使用C ++编写了一个程序,其中我使用Dcmtk的外部库。我现在想为该程序添加一个用户界面。在我原来的程序中,我不得不将Visual Studio中代码生成设置中的C ++ 运行库
更改为多线程(/ MT)
从多线程调试DLL
否则程序将无法工作。我必须做同样的在QtCreator,但我不知道如何改变这个设置在Qt。你能请你建议我该怎么办?感谢。
I'm absolutely new to Qt. I've made a program using C++ in Visual Studio 2010 in which I use the external library from Dcmtk. I now want to add a user interface to that program. In my original program I had to change the C++ Runtime Library
in Code Generation setting in Visual Studio to Multi-Threaded(/MT)
from Multi-Threaded Debug DLL
otherwise the program would not work. I have to do the same in QtCreator, but I don't know how to change that setting in Qt. Could you please suggest how I should approach that? Thanks.
推荐答案
/ MT
是一个编译器标志。您可以在.pro文件中指定标志,如下所示:
/MT
is a compiler flag. You can specify flags in your .pro file like this:
QMAKE_CXXFLAGS + = / MT
此外,您可能想要为调试版本指定 / MTd
:
Moreover, you probably want to specify /MTd
for debug build:
Release:QMAKE_CXXFLAGS += /MT
Debug:QMAKE_CXXFLAGS += /MTd
这篇关于如何更改QtCreator中的C ++运行时库设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!