1
我已經安裝的Qt 4.8.4 Visual Studio 2010中
QT-雙贏開源-4.8.4-vs2010.exe
http://download.qt-project.org/archive/qt/4.8/4.8.4/的Qt 4.8.4在調試模式下編譯給錯誤
Qt工程文件:
LIBS += -lqaxserver \ -lqaxcontainer
在我的Qt GUI應用程序中,我使用QAxobject訪問ms-excel。
當我在發佈模式下編譯我的項目時,我沒有得到任何錯誤。 GUI正在按預期運行。我能夠使用QAxObject對象生成excel文件。
file not found: qaxcontainer.lib(qaxbase.obj) file not found: qaxcontainer.lib(qaxobject.obj) file not found: qaxcontainer.lib(qaxtypes.obj)
爲什麼會發生這種情況僅在調試版本:
但這樣做調試版本時,我得到了以下3個錯誤?我如何解決它?
編輯:----
我評論LIBS &添加CONFIG。仍然沒有更改發佈模式正在編譯調試正在給出錯誤。
#LIBS += -lqaxserver \ # -lqaxcontainer CONFIG += qaxserver CONFIG += qaxcontainer
現在我得到7個錯誤:----
AxServerd.lib(qaxtypes.obj) : error LNK2005: "class QColor __cdecl OLEColorToQColor(unsigned int)" ([email protected]@[email protected]@[email protected]) already defined in QAxContainerd.lib(qaxtypes.obj) QAxServerd.lib(qaxtypes.obj) : error LNK2005: "bool __cdecl QVariantToVARIANT(class QVariant const &,struct tagVARIANT &,class QByteArray const &,bool)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]) already defined in QAxContainerd.lib(qaxtypes.obj) QAxServerd.lib(qaxtypes.obj) : error LNK2005: "bool __cdecl QVariantToVoidStar(class QVariant const &,void *,class QByteArray const &,unsigned int)" ([email protected]@[email protected]@[email protected]@[email protected]) already defined in QAxContainerd.lib(qaxtypes.obj) QAxServerd.lib(qaxtypes.obj) : error LNK2005: "class QVariant __cdecl VARIANTToQVariant(struct tagVARIANT const &,class QByteArray const &,unsigned int)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]) already defined in QAxContainerd.lib(qaxtypes.obj) QAxServerd.lib(qaxtypes.obj) : error LNK2005: "void __cdecl clearVARIANT(struct tagVARIANT *)" ([email protected]@[email protected]@@Z) already defined in QAxContainerd.lib(qaxtypes.obj) QAxServerd.lib(qaxserver.obj) : error LNK2019: unresolved external symbol "class QAxFactory * __cdecl qax_instantiate(void)" ([email protected]@[email protected]@XZ) referenced in function "class QAxFactory * __cdecl qAxFactory(void)" ([email protected]@[email protected]@XZ) debug\geny.exe : fatal error LNK1120: 1 unresolved externals link /LIBPATH:"c:\Qt\4.8.4\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /MANIFEST /MANIFESTFILE:"debug\geny.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debug\geny.exe @C:\Users\dguleria\AppData\Local\Temp\geny.exe.17776.15.jom C:\QtSDK\QtCreator\bin\jom.exe -f Makefile.Debug
仍然沒有工作的調試模式。我已經編輯了原來的職位..請參閱錯誤有..任何建議? – Katoch
@Katoch確保在構建之前執行「乾淨」的步驟。還要確保你的項目文件中沒有任何硬編碼的庫路徑。 –
我們必須包括的僅僅是 - CONFIG + = qaxcontainer ---然後它工作..謝謝 – Katoch