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]Errors when linking to a shared Qt library that I built.
Forum Updated to NodeBB v4.3 + New Features

[solved]Errors when linking to a shared Qt library that I built.

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

    I have packaged a dialog required from my application to a shared library and build it as a dll in MSVC 2008. I build the applications also in the same IDE. The library gets built fine without errors. But in some instances my application fails to build with link errors. These link error

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

      Are you using "vsaddin":http://developer.qt.nokia.com/wiki/QtVSAddin
      If not, installing it may solve your problems.

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

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SeedOfLife
        wrote on last edited by
        #3

        Yes I am using vsaddin. I have successfully compiled GUI applications in Qt which do not use shared libraries (i.e. sole applications). This is the only instance that I wanted to package functionality in a shared library dll and have other GUIs built linking that.

        Although I mentioned the link problem only occurs when I make changes to the GUI aplpication using the dll in the post above, it so happens that similar link errors(with reagards to QMetaCall) popup even when I make changes to the dll project as well. I then have to toggle the MocDirectory to resolve these link errors.

        These are the link errors from the library "http://pastebin.com/eB3f8iTe":http://pastebin.com/eB3f8iTe

        And the errors from the tester app to test the library
        "http://pastebin.com/UsqPn1HP":http://pastebin.com/UsqPn1HP

        Can somebody explain to me what really happens when I toggle this MocDirectory setting. ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SeedOfLife
          wrote on last edited by
          #4

          I found out the problem. Whnever the cpp files are changed the moc files listed under GeneratedFiles in Solution Explorer of MSVC, get Excluded from Build. Googling the cause for this led me to "this":http://stackoverflow.com/questions/1200268/qt4-in-visual-studio-2008-moc-ed-files-get-excluded-from-build.

          According to that I set my MocDirectory in Qt Project Settings of the project to .\GeneratedFiles$(ConfigurationName). Any folder will do as long as it is subjected to the Build Config as set by Configuration Name above.

          Pls treat this thread as solved.

          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