我有一个带有这样的项目文件的小型 Qt 项目:
TEMPLATE = lib
TARGET = record32
VERSION = 0.0.1
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += shared
SOURCES += recorder.cpp
HEADERS += recorder.h
当我从它编译一个库时qmake && nmake
,它会生成文件
record32.obj
record320.lib
record320.dll
...
为什么将额外的 0 添加到 lib 和 dll 名称中?
生成的makefile似乎没有附加它,而是假设它,Makefile.Release
它只是说:
####### Files
SOURCES = recorder.cpp release\moc_recorder.cpp
OBJECTS = release\recorder.obj release\moc_recorder.obj
DIST =
QMAKE_TARGET = recorder
DESTDIR = release\ #avoid trailing-slash linebreak
TARGET = record320.dll
DESTDIR_TARGET = release\record320.dll
如何防止它并根据需要命名我的库?
(请注意,手动修复 makefile.release 不是可接受的解决方案)