與Qt的* .pro文件的一個問題:Qt的鏈接器錯誤:無法找到-lQtCored
TARGET = ProgName
TEMPLATE = app
CONFIG += console
QT += core
QT += gui
LIBS += -LC:\\Qt\\4.8.5\\bin
LIBS += -LC:\\Qt\\4.8.5\\lib
LIBS += -LS:\\lib
# LIBS += -lQtCored4 # not necessary
# LIBS += -lQtCore4
# LIBS += -lQtGuid4
# LIBS += -lQtGui4
SOURCES += ...
HEADERS += ...
我得到這些鏈接器錯誤:
:-1: error: cannot find -lQtGuid
:-1: error: cannot find -lQtCored
collect2.exe:-1: error: error: ld returned 1 exit status
所有的DLL在指定的目錄存在。
該文檔沒有多大幫助。
這個pro文件幾天前工作,它似乎有問題,因爲我安裝Qt 5.1(這還沒有使用,但我仍然與Qt4工作)。
平臺:Windows 7中,MinGW的,Qt的4.8.4