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.8k 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.
  • 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