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. Missing meta object information with ActiveQt server
Forum Updated to NodeBB v4.3 + New Features

Missing meta object information with ActiveQt server

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

    Hi,

    I have a dll that I've written in Qt which can be used successfully with other Qt apps. The top level widget is a singleton class.

    I now need to suppport someone that's using the .Net framework and want to provide the dll functionality as a COM object using ActiveQt.

    I've created a wrapper application that acts as a facade to the dll. The problem I have is that when I try to compile, if the code calls functions in the original dll, I get the following error: -

    1> C:\Qt\4.7.1\bin\idc.exe c:\src\dotnetcomwrapper\debug\dotnetcomwrapperd.dll /regserver
    1>debug\obj\dotnetcomwrapperd.idl
    1>Couldn't load library file c:\src\dotnetcomwrapper\debug\dotnetcomwrapperd.dll
    1>Class has no metaobject information (error in c:\src\dotnetcomwrapper\debug\dotnetcomwrapperd.dll)!

    With that error, the dll fails to register as a COM service.

    If I remove any calls to the dll, the compilation works and the dll is registered successfully as a COM object.
    Can someone please explain why no metaobject information is being created?

    Having played around, I was able to get it to work once, so I know it's possible, but don't know what I did and it's no longer generating a dll with valid metaobject information.

    Thanks,
    Simon ;O)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Note: I have no experience with ActiveQt.

      One reason why no metaobject is generated, could be that you forgot to include the Q_OBJECT macro?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mr-Merlin
        wrote on last edited by
        #3

        Thanks, that was my first thought, but it's not the problem.

        It appears that when the post process calls are made to the IDL binary under Visual studio, it fails, but if I open a cmd prompt and type them myself, it then works!

        It's as though the post process commands aren't being run sequentially.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Sorry, I can not help you with that, as that is way outside of my experience zone. Good luck!

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            [quote author="Mr-Merlin" date="1319098498"]It appears that when the post process calls are made to the IDL binary under Visual studio, it fails, but if I open a cmd prompt and type them myself, it then works!
            It's as though the post process commands aren't being run sequentially.
            [/quote]

            Sounds it's a path problem? If you enter a command line, do you use the Qt command line?

            Do you build typically by MSVS?

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mr-Merlin
              wrote on last edited by
              #6

              Andre - thanks anyway, for taking the time to reply.

              Gerolf, I don't think it's a path problem, because I can copy the commands directly from the Visual Studio build window into the cmd prompt window and then they work. The commands in VS provide full paths.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on last edited by
                #7

                To the executables, yes. But where are the libraryies located, that are loaded?
                I have seen such things already: A tool (idc.exe) load your build dll and that dll has dependencies which perhaps can't be resolved...

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Mr-Merlin
                  wrote on last edited by
                  #8

                  The dependent dlls are in the same directory as the dll that idc is loading. Annoyingly, idc doesn't provide any useful output. I tried using procmon (previously filemon) to see if it's failing to find any files, but with no success.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Mr-Merlin
                    wrote on last edited by
                    #9

                    I've been asked if I have found a solution. I never did work out why the post-process doesn't work the way it's supposed to. However, I did come up with a solution.

                    If you add qaxserver_no_postlink to the CONFIG option in the .pro file, it will turn off the post process steps that are failing.

                    Next, create a batch file with the required calls to the idc that work when called from the command prompt.

                    Add the batch file to the .pro (e.g. QMAKE_POST_LINK = postbuild_release.bat) to enable it to be called in the post process step and then reload the project.

                    This now works, but ensure that if you build a debug version, you'll probably need to unregister the dll before running a release version.

                    I hope that helps anyone else with the same issue.

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      pmdev
                      wrote on last edited by
                      #10

                      Please, can you post the content of your .bat file?

                      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