Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use the axcontainer?
Forum Updated to NodeBB v4.3 + New Features

How to use the axcontainer?

Scheduled Pinned Locked Moved Solved General and Desktop
17 Posts 3 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chad.cao
    wrote on last edited by
    #1

    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

    JonBJ 2 Replies Last reply
    0
    • C Chad.cao

      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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Chad-cao
      If you have not done so already, do a complete delete files in build output directory and rebuild?
      You might need a CONFIG += gui (or whatever it is for that) if you do not already have that.
      Is whatever .lib file it uses for qaxcontainer in the same directory as your QtGuid4.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.

      C 1 Reply Last reply
      0
      • JonBJ JonB

        @Chad-cao
        If you have not done so already, do a complete delete files in build output directory and rebuild?
        You might need a CONFIG += gui (or whatever it is for that) if you do not already have that.
        Is whatever .lib file it uses for qaxcontainer in the same directory as your QtGuid4.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.

        C Offline
        C Offline
        Chad.cao
        wrote on last edited by
        #3

        @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

        jsulmJ JonBJ 2 Replies Last reply
        0
        • C Chad.cao

          @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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Chad-cao Please show your pro file

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          C JonBJ 2 Replies Last reply
          0
          • C Chad.cao

            @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

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @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 has d:\..., the error message states e:\...

            Track down where the e: comes from, everything else is d:.

            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 leading d:, in which case it would use your current drive of e:... ?

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @Chad-cao Please show your pro file

              C Offline
              C Offline
              Chad.cao
              wrote on last edited by
              #6

              @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

              jsulmJ 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Chad-cao Please show your pro file

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @jsulm
                Note how the error message references e:\Qt\.... I cannot see anywhere it is getting the e: from??

                C 1 Reply Last reply
                0
                • C Chad.cao

                  @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

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Chad-cao said in How to use the axcontainer?:

                  CONFIG += gui

                  Why?
                  You already added gui modules using QT += core gui

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • JonBJ JonB

                    @jsulm
                    Note how the error message references e:\Qt\.... I cannot see anywhere it is getting the e: from??

                    C Offline
                    C Offline
                    Chad.cao
                    wrote on last edited by
                    #9

                    @JonB
                    Yes, this is the problem. And I am also very confused.
                    @jsulm
                    Forget it. Just following the JonB's advice to make a test. And I also tested the CONFIG+=axcontainer, also does not work, same error.
                    Thank you very much.
                    Chad

                    jsulmJ 1 Reply Last reply
                    0
                    • C Chad.cao

                      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

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by JonB
                      #10

                      @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 the axcontainer 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?

                      C 1 Reply Last reply
                      0
                      • C Chad.cao

                        @JonB
                        Yes, this is the problem. And I am also very confused.
                        @jsulm
                        Forget it. Just following the JonB's advice to make a test. And I also tested the CONFIG+=axcontainer, also does not work, same error.
                        Thank you very much.
                        Chad

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @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)?

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        JonBJ 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @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)?

                          JonBJ Offline
                          JonBJ Offline
                          JonB
                          wrote on last edited by
                          #12

                          @jsulm said in How to use the axcontainer?:

                          Does your app build if you only add QT += axcontainer (CONFIG += qaxcontainer is wrong)?

                          Ahh.....! Good start :)

                          1 Reply Last reply
                          0
                          • JonBJ JonB

                            @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 the axcontainer 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?

                            C Offline
                            C Offline
                            Chad.cao
                            wrote on last edited by
                            #13

                            @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

                            JonBJ 1 Reply Last reply
                            0
                            • C Chad.cao

                              @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

                              JonBJ Offline
                              JonBJ Offline
                              JonB
                              wrote on last edited by
                              #14

                              @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 any e: and/or plain \qt\4.8.7 without a leading d:?

                              C 1 Reply Last reply
                              0
                              • JonBJ JonB

                                @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 any e: and/or plain \qt\4.8.7 without a leading d:?

                                C Offline
                                C Offline
                                Chad.cao
                                wrote on last edited by
                                #15

                                @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

                                JonBJ 1 Reply Last reply
                                0
                                • C Chad.cao

                                  @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

                                  JonBJ Offline
                                  JonBJ Offline
                                  JonB
                                  wrote on last edited by
                                  #16

                                  @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....

                                  C 1 Reply Last reply
                                  0
                                  • JonBJ JonB

                                    @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....

                                    C Offline
                                    C Offline
                                    Chad.cao
                                    wrote on last edited by
                                    #17

                                    @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

                                    1 Reply Last reply
                                    1

                                    • Login

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Groups
                                    • Search
                                    • Get Qt Extensions
                                    • Unsolved