How to use the axcontainer?
-
Dear friends,
Now I am using QT creator with QT4.8.7 to program an excel. As you know, programmers work on outdated code all the time.
Now I meet an problem: if I add config (CONFIG += qaxcontainer) to the pro file, then there will be an Link error "1104: could not find "e:\Qt\4.8.7\lib\QtGuid4.lib". This is strange, this lib is under the "d:\Qt\4.8.7\lib", and my project is located at the "E:\". And the QT path in the environment also is right.
So anyone knows what happened?
Thanks
Chad -
Dear friends,
Now I am using QT creator with QT4.8.7 to program an excel. As you know, programmers work on outdated code all the time.
Now I meet an problem: if I add config (CONFIG += qaxcontainer) to the pro file, then there will be an Link error "1104: could not find "e:\Qt\4.8.7\lib\QtGuid4.lib". This is strange, this lib is under the "d:\Qt\4.8.7\lib", and my project is located at the "E:\". And the QT path in the environment also is right.
So anyone knows what happened?
Thanks
Chad@Chad-cao
If you have not done so already, do a complete delete files in build output directory and rebuild?
You might need aCONFIG += gui
(or whatever it is for that) if you do not already have that.
Is whatever.lib
file it uses forqaxcontainer
in the same directory as yourQtGuid4.lib
?Otherwise perhaps show the actual link command line being executed and the error message by copying ans pasting from Creator build output window, please.
-
@Chad-cao
If you have not done so already, do a complete delete files in build output directory and rebuild?
You might need aCONFIG += gui
(or whatever it is for that) if you do not already have that.
Is whatever.lib
file it uses forqaxcontainer
in the same directory as yourQtGuid4.lib
?Otherwise perhaps show the actual link command line being executed and the error message by copying ans pasting from Creator build output window, please.
@JonB
Thanks for your reply.
Yes, Under D:\qt\4.8.7\lib, both QAxContainer.lib and QtGuid4.lib are there.
And I had tried clean the output directory many times, still not work.
For CONFIG += gui, I tested but not work. For other config, I am not sure.I am an driver engineer, so I'm still not very familiar with QT.
And about the compile output:
/****/
16:31:23: 进程"D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe"正常退出。
16:31:23: 配置没有改变, 跳过 qmake 步骤。
16:31:23: 正在启动 "D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe""D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe" -f Makefile.Debug d:\qt\4.8.7\bin\uic.exe ..\HelloWorks\mainwindow.ui -o ui_mainwindow.h cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\main.obj.16932.31.jom cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\study.obj.16932.47.jom D:\qt\4.8.7\bin\moc.exe -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -D_MSC_VER=1900 -DWIN32 ..\HelloWorks\mainwindow.h -o debug\moc_mainwindow.cpp
main.cpp
study.cpp
cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\mainwindow.obj.16932.62.jom
mainwindow.cpp
cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\moc_mainwindow.obj.16932.297.jom
moc_mainwindow.cpp
link /LIBPATH:"d:\qt\4.8.7\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /OUT:debug\HelloWorks.exe @C:\Users\CaoSC\AppData\Local\Temp\HelloWorks.exe.16932.1406.jom
LINK : fatal error LNK1104: 无法打开文件“e:\Qt\4.8.7\lib\QtGuid4.lib”
jom: E:\Data\CompileStudy\QtTest\build-HelloWorks-unknown-Debug\Makefile.Debug [debug\HelloWorks.exe] Error 1104
jom: E:\Data\CompileStudy\QtTest\build-HelloWorks-unknown-Debug\Makefile [debug] Error 2
16:31:24: 进程"D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe"退出,退出代码 2 。
Error while building/deploying project HelloWorks (kit: 桌面)
When executing step "Make"
16:31:24: Elapsed time: 00:02.
/****/
About the compile log, it confused me. Looks like every file had been compiled successfully. only at the end, the link error occurs.
Thanks
Chad -
@JonB
Thanks for your reply.
Yes, Under D:\qt\4.8.7\lib, both QAxContainer.lib and QtGuid4.lib are there.
And I had tried clean the output directory many times, still not work.
For CONFIG += gui, I tested but not work. For other config, I am not sure.I am an driver engineer, so I'm still not very familiar with QT.
And about the compile output:
/****/
16:31:23: 进程"D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe"正常退出。
16:31:23: 配置没有改变, 跳过 qmake 步骤。
16:31:23: 正在启动 "D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe""D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe" -f Makefile.Debug d:\qt\4.8.7\bin\uic.exe ..\HelloWorks\mainwindow.ui -o ui_mainwindow.h cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\main.obj.16932.31.jom cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\study.obj.16932.47.jom D:\qt\4.8.7\bin\moc.exe -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -D_MSC_VER=1900 -DWIN32 ..\HelloWorks\mainwindow.h -o debug\moc_mainwindow.cpp
main.cpp
study.cpp
cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\mainwindow.obj.16932.62.jom
mainwindow.cpp
cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\moc_mainwindow.obj.16932.297.jom
moc_mainwindow.cpp
link /LIBPATH:"d:\qt\4.8.7\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /OUT:debug\HelloWorks.exe @C:\Users\CaoSC\AppData\Local\Temp\HelloWorks.exe.16932.1406.jom
LINK : fatal error LNK1104: 无法打开文件“e:\Qt\4.8.7\lib\QtGuid4.lib”
jom: E:\Data\CompileStudy\QtTest\build-HelloWorks-unknown-Debug\Makefile.Debug [debug\HelloWorks.exe] Error 1104
jom: E:\Data\CompileStudy\QtTest\build-HelloWorks-unknown-Debug\Makefile [debug] Error 2
16:31:24: 进程"D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe"退出,退出代码 2 。
Error while building/deploying project HelloWorks (kit: 桌面)
When executing step "Make"
16:31:24: Elapsed time: 00:02.
/****/
About the compile log, it confused me. Looks like every file had been compiled successfully. only at the end, the link error occurs.
Thanks
Chad@Chad-cao Please show your pro file
-
@JonB
Thanks for your reply.
Yes, Under D:\qt\4.8.7\lib, both QAxContainer.lib and QtGuid4.lib are there.
And I had tried clean the output directory many times, still not work.
For CONFIG += gui, I tested but not work. For other config, I am not sure.I am an driver engineer, so I'm still not very familiar with QT.
And about the compile output:
/****/
16:31:23: 进程"D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe"正常退出。
16:31:23: 配置没有改变, 跳过 qmake 步骤。
16:31:23: 正在启动 "D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe""D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe" -f Makefile.Debug d:\qt\4.8.7\bin\uic.exe ..\HelloWorks\mainwindow.ui -o ui_mainwindow.h cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\main.obj.16932.31.jom cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\study.obj.16932.47.jom D:\qt\4.8.7\bin\moc.exe -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -D_MSC_VER=1900 -DWIN32 ..\HelloWorks\mainwindow.h -o debug\moc_mainwindow.cpp
main.cpp
study.cpp
cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\mainwindow.obj.16932.62.jom
mainwindow.cpp
cl -c -nologo -Zm200 -Zc:wchar_t- -FS -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"d:\qt\4.8.7\include\QtCore" -I"d:\qt\4.8.7\include\QtGui" -I"d:\qt\4.8.7\include" -I"d:\qt\4.8.7\include\ActiveQt" -I"debug" -I"." -I"..\HelloWorks" -I"." -I"d:\qt\4.8.7\mkspecs\default" -Fodebug\ @C:\Users\CaoSC\AppData\Local\Temp\moc_mainwindow.obj.16932.297.jom
moc_mainwindow.cpp
link /LIBPATH:"d:\qt\4.8.7\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /OUT:debug\HelloWorks.exe @C:\Users\CaoSC\AppData\Local\Temp\HelloWorks.exe.16932.1406.jom
LINK : fatal error LNK1104: 无法打开文件“e:\Qt\4.8.7\lib\QtGuid4.lib”
jom: E:\Data\CompileStudy\QtTest\build-HelloWorks-unknown-Debug\Makefile.Debug [debug\HelloWorks.exe] Error 1104
jom: E:\Data\CompileStudy\QtTest\build-HelloWorks-unknown-Debug\Makefile [debug] Error 2
16:31:24: 进程"D:\Program Files (x86)\Qt\qtcreator-4.7.2\bin\jom.exe"退出,退出代码 2 。
Error while building/deploying project HelloWorks (kit: 桌面)
When executing step "Make"
16:31:24: Elapsed time: 00:02.
/****/
About the compile log, it confused me. Looks like every file had been compiled successfully. only at the end, the link error occurs.
Thanks
Chad@Chad-cao said in How to use the axcontainer?:
link /LIBPATH:"d:\qt\4.8.7\lib" ...
LINK : fatal error LNK1104: 无法打开文件“e:\Qt\4.8.7\lib\QtGuid4.lib”
Yes, Under
D:\qt\4.8.7\lib
, both QAxContainer.lib and QtGuid4.lib are there.The
LIBPATH
hasd:\...
, the error message statese:\...
Track down where the
e:
comes from, everything else isd:
.And the QT path in the environment also is right.
Show what you mean by that, and show your
.pro
file. I wonder whether you're going to show\Qt\4.8.7\lib
somewhere without a leadingd:
, in which case it would use your current drive ofe:
... ? -
@jsulm @JonB
Thanks. I also checked all the configurations I could find, and found nothing that would cause this wrong disk. If you need any file, Just let me know. The following is the pro file:
QT += core gui
CONFIG += qaxcontainer
QT += qaxcontainer
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = HelloWorks
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
CONFIG += c++11
CONFIG += gui
SOURCES += main.cpp mainwindow.cpp study.cpp
HEADERS += mainwindow.h study.h
FORMS += mainwindow.ui
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target(My rating is low, so there is a 10 minutes posting limit.)
Thanks again.
Chad -
@jsulm @JonB
Thanks. I also checked all the configurations I could find, and found nothing that would cause this wrong disk. If you need any file, Just let me know. The following is the pro file:
QT += core gui
CONFIG += qaxcontainer
QT += qaxcontainer
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = HelloWorks
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
CONFIG += c++11
CONFIG += gui
SOURCES += main.cpp mainwindow.cpp study.cpp
HEADERS += mainwindow.h study.h
FORMS += mainwindow.ui
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target(My rating is low, so there is a 10 minutes posting limit.)
Thanks again.
Chad@Chad-cao said in How to use the axcontainer?:
CONFIG += gui
Why?
You already added gui modules using QT += core gui -
@jsulm
Note how the error message referencese:\Qt\...
. I cannot see anywhere it is getting thee:
from?? -
Dear friends,
Now I am using QT creator with QT4.8.7 to program an excel. As you know, programmers work on outdated code all the time.
Now I meet an problem: if I add config (CONFIG += qaxcontainer) to the pro file, then there will be an Link error "1104: could not find "e:\Qt\4.8.7\lib\QtGuid4.lib". This is strange, this lib is under the "d:\Qt\4.8.7\lib", and my project is located at the "E:\". And the QT path in the environment also is right.
So anyone knows what happened?
Thanks
Chad@Chad-cao said in How to use the axcontainer?:
And the QT path in the environment also is right.
What exactly did you mean by this?
Also, if you retain the
gui
stuff in the.pro
file but remove all theaxcontainer
stuff from there and from your code, what happens about the"e:\Qt\4.8.7\lib\QtGuid4.lib"
error message when you build & link like that? -
@Chad-cao Lets start from the beginning: does your app build if you do not add axcontainer at all?
Does your app build if you only add QT += axcontainer (CONFIG += qaxcontainer is wrong)? -
@Chad-cao Lets start from the beginning: does your app build if you do not add axcontainer at all?
Does your app build if you only add QT += axcontainer (CONFIG += qaxcontainer is wrong)? -
@Chad-cao said in How to use the axcontainer?:
And the QT path in the environment also is right.
What exactly did you mean by this?
Also, if you retain the
gui
stuff in the.pro
file but remove all theaxcontainer
stuff from there and from your code, what happens about the"e:\Qt\4.8.7\lib\QtGuid4.lib"
error message when you build & link like that?@JonB
In the system's environment, QTDIR = D:\qt\4.8.7.
At the beginning, with my experience with VS, I suspect this problem is caused by the wrong environment. So just let you know, it is not caused by the wrong environment.
@jsulm
I tested, if add QT+=axcontainer, during the compile, it will report error link 2019, QAxObject can not be parsed. Should I solve this problem instead of solving the wrong lib path?
Thanks
Chad -
@JonB
In the system's environment, QTDIR = D:\qt\4.8.7.
At the beginning, with my experience with VS, I suspect this problem is caused by the wrong environment. So just let you know, it is not caused by the wrong environment.
@jsulm
I tested, if add QT+=axcontainer, during the compile, it will report error link 2019, QAxObject can not be parsed. Should I solve this problem instead of solving the wrong lib path?
Thanks
Chad@Chad-cao said in How to use the axcontainer?:
In the system's environment, QTDIR = D:\qt\4.8.7.
OK. The mystery to me is why the linker ever decides to look in
e:\Qt\4.8.7\...
then?! Can you search everywhere for anye:
and/or plain\qt\4.8.7
without a leadingd:
? -
@Chad-cao said in How to use the axcontainer?:
In the system's environment, QTDIR = D:\qt\4.8.7.
OK. The mystery to me is why the linker ever decides to look in
e:\Qt\4.8.7\...
then?! Can you search everywhere for anye:
and/or plain\qt\4.8.7
without a leadingd:
?@JonB @jsulm
a small step.
I checked the Makefile in the output directory. then in the Makefile.Debug, I find this:
LIBS = d:\qt\4.8.7\lib\qtmaind.lib d:\qt\4.8.7\lib\QAxContainerd.lib d:\qt\4.8.7\lib\QtGuid4.lib d:\qt\4.8.7\lib\QtCored4.lib ole32.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib e:\Qt\4.8.7\lib\QtGuid4.lib e:\Qt\4.8.7\lib\QtCored4.lib
Looks like the lib is configured right at first. but a wrong path is configured after that. So the right path is covered. So looks like there is a double config at somewhere. Do you have any idea?
Thanks
Chad -
@JonB @jsulm
a small step.
I checked the Makefile in the output directory. then in the Makefile.Debug, I find this:
LIBS = d:\qt\4.8.7\lib\qtmaind.lib d:\qt\4.8.7\lib\QAxContainerd.lib d:\qt\4.8.7\lib\QtGuid4.lib d:\qt\4.8.7\lib\QtCored4.lib ole32.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib e:\Qt\4.8.7\lib\QtGuid4.lib e:\Qt\4.8.7\lib\QtCored4.lib
Looks like the lib is configured right at first. but a wrong path is configured after that. So the right path is covered. So looks like there is a double config at somewhere. Do you have any idea?
Thanks
Chad@Chad-cao said in How to use the axcontainer?:
e:\Qt\4.8.7\lib\QtGuid4.lib e:\Qt\4.8.7\lib\QtCored4.lib
Yup, we (you!) need to track down just where that is coming from! I don't know....
-
@Chad-cao said in How to use the axcontainer?:
e:\Qt\4.8.7\lib\QtGuid4.lib e:\Qt\4.8.7\lib\QtCored4.lib
Yup, we (you!) need to track down just where that is coming from! I don't know....
@JonB
I think I find out the reason.
Under the D:\qt\4.8.7\lib\QAxContainer.prl, edit it, the container path is wrong. This caused the problem. So re-install the QT or change it will solve the problem.
I think re-install the QT will be better.
Thanks
Chad