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. [Solved] Qt 5.1.0 for Windows 32-bit (VS 2010, 505 MB) doesn't work

[Solved] Qt 5.1.0 for Windows 32-bit (VS 2010, 505 MB) doesn't work

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.9k 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.
  • M Offline
    M Offline
    mrplplplplpl
    wrote on last edited by
    #1

    I have downloaded four Qt 5.1.0 packages:
    Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)
    Qt 5.1.0 for Windows 32-bit (VS 2010, 505 MB)
    Qt 5.1.0 for Windows 64-bit (VS 2012, 525 MB)
    Qt 5.1.0 for Windows 64-bit (VS 2012, OpenGL, 522 MB)

    After installed all these four packages, I created a very simple
    QT project by using Qt 5.1.0 for Windows 32-bit (VS 2010, 505 MB)

    The project is a Qt gui application with a ui form. I created it just follow the
    Qt Creator's template without typing any word. After that I built this project
    and run, everything is OK.

    Then I added a new C++ class to the project. The added C++ class's base class is QWidget.
    This time, I still did not type any word in the .cpp and .h file. So the added class
    only was created by Qt Creator. After that I built this project again, and run,
    everything is still OK.

    Now I began to add my code.
    I added one line in the mainwindow.h:
    #include "myclass.h"

    Then I added another line in the mainwindow.cpp:
    pMyClass = new CMyClass(this);

    After that I built this project again, this time two errors happened.

    error LNK2001: unresolved external symbol public: __thiscall CMyClass::CMyClass(class QWidget *)" (??

    0CMyClass@@QAE@PAVQWidget@@@Z)

    error LNK1120: 1 unresolved externals

    I built the same project by using another three Qt versions:
    Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)
    Qt 5.1.0 for Windows 64-bit (VS 2012, 525 MB)
    Qt 5.1.0 for Windows 64-bit (VS 2012, OpenGL, 522 MB)

    Build and run were all successful. Everything is OK.

    Because my project can be built and run successfully by using
    Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)
    Qt 5.1.0 for Windows 64-bit (VS 2012, 525 MB)
    Qt 5.1.0 for Windows 64-bit (VS 2012, OpenGL, 522 MB)

    I am pretty sure there is nothing wrong in my project.

    Only using Qt 5.1.0 for Windows 32-bit (VS 2010, 505 MB) errors happen.

    I was confused by the results. I checked the build directories,
    and I found VS 2010 did not compile mycalss.cpp!
    All other three build directories have the .obj files or .o files of myclass.
    So when link, errors happened.

    My System is Windows7 64bit Ultimate.
    Does anyone know how to solve this problem?

    Thanks.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrplplplplpl
      wrote on last edited by
      #2

      With some nice advice, I sloved it myself.
      First run qmake, then build.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @mrplplplplpl: despite not a huge discussion, I find your post quite informative. Can you put "[Solved]" to the title of this thread, to let everybody know that there is a solution.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mrplplplplpl
          wrote on last edited by
          #4

          OK, willi, thanks you reminding.

          1 Reply Last reply
          0

          • Login

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