Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qtwinmigrate
Forum Updated to NodeBB v4.3 + New Features

Qtwinmigrate

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 4 Posters 10.6k Views 1 Watching
  • 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.
  • L Offline
    L Offline
    lorik
    wrote on last edited by
    #1

    Hi,
    I want to use qtwinmigrate to speak with windows messaging application. I build the dll ,included all includes and libs in visual studio 2008 project , and still have some link problem:
    error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWinHost::staticMetaObject" (?staticMetaObject@QWinHost@@2UQMetaObject@@B)

    What can be the problem?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      It looks like QWinHost has to be "registered":http://doc.qt.nokia.com/4.7/qmetatype.html#qRegisterMetaType with Qt

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lorik
        wrote on last edited by
        #3

        thanks for your reply
        tried this:
        Q_DECLARE_METATYPE(QWinHost)

        Now I have another problem in qwinhost.h :
        Error 1 error C2248: 'QWidget::QWidget' : cannot access private member declared in class 'QWidget' c:\qt\4.7.2\qtwinmigrate-2.8-opensource\src\qwinhost.h 98

        It's not my file . I am trying to add a new package qtwinmigrate to qt
        I downloaded the qtwinmigrate-2.8-opensource and want to run the QWinHost included example
        with Visual Studio 2008

        I am looking for someone that already did it and succeeded

        what is the right sequence of actions to make it work?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          PaSt
          wrote on last edited by
          #4

          Hi guys,

          I know, this thread is cold since more than two years, but I've got exactly the same problem as described by lorik:
          first the linker error LNK2001 (after implementing the example [1]), second registered the QWinHost using Q_DECLARE_METATYPE(QWinHost), third got the C2248.
          So if somebody knows what to do about the error C2248 or got an idea about the reason, I would be very grateful!

          Using VS2008 & Qt 4.7.4.

          TIA!

          [1] http://doc.qt.digia.com/solutions/4/qtwinmigrate/winmigrate-win32-in-qt-example.html

          1 Reply Last reply
          0
          • R Offline
            R Offline
            romain06
            wrote on last edited by
            #5

            Hello,

            After some tries, I am finally able to compile QtwinMigrate library (QtSolutions_MFCMigrationFramework-head.lib) on Qt5.

            But when I try to use this library with the QtwinMigrate sample code from an MFC application, I get the following link errors :

            • error LNK2019: symbole externe non résolu "__declspec(dllimport) public: static class QApplication * __cdecl QMfcApp::instance()
            • error LNK2019: symbole externe non résolu "__declspec(dllimport) public: __thiscall QWinWidget::QWinWidget()
            • error LNK2019: symbole externe non résolu "__declspec(dllimport) public: static int __cdecl QMfcApp::run(class CWinApp *)
              Do you have any idea ?

            Thanks in advance,
            Romain.

            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