修改qtcreator 生成exe的目录(windows)

windows平台下,QtCreator创建工程,构建后,生成的exe目录,默认在工程目录同级的目录中。有时候,我们想修改这个目录。可以使用下面方法:

在pro文件中,添加

CONFIG(debug,debug|release){
DESTDIR = ./../debug_bin
LIBS += -L./../debug_bin
LIBS += -lManageExport
}
 
CONFIG(release,debug|release){
DESTDIR = ./../release_bin
LIBS += -L./../release_bin
LIBS += -lManageExport
}

这时候,生成的exe目录在工程目录同级的debug_bin目录中。

上面LIBS是添加了使用的库所在的目录,这里指向debug_bin目录,库的名称是ManageExport.lib和ManageExport.dll。(使用的是msvc)

 

猜你喜欢

转载自www.cnblogs.com/warmlight/p/12980433.html