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. Can Qt use Visual C++/MFC static library?
Forum Updated to NodeBB v4.3 + New Features

Can Qt use Visual C++/MFC static library?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 4.0k 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.
  • C Offline
    C Offline
    chcw
    wrote on 4 Oct 2012, 00:56 last edited by
    #1

    Hi, In my Qt project, I use Visual C++ 2008 compiler. Can I linked a static library, which is written with Visual C++/MFC and compiled with the same compiler.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on 4 Oct 2012, 01:17 last edited by
      #2

      Yes. As in your other thread, this is not Qt-specific at all. Just go to your project properties in VisualStudio and add the desired library under "Linker -> Input -> Additional Dependencies". If your project uses Qt, you are probably already linking against the Qt libraries at the very same place. Just add the additional library there...

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on 4 Oct 2012, 07:37 last edited by
        #3

        In theory you can, but how do you want to include it?
        If you want to use MFC dialogs / windows, (AFAIK) you have to do more then just link to it.

        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
        • C Offline
          C Offline
          chcw
          wrote on 5 Oct 2012, 01:27 last edited by
          #4

          I want to linked with a static library built with MFC(containing dialogs & windows). I think I should first build the static library with MFC statically linked, then add all the resources into the Qt Creator project, then add the linked the static library.

          One problem is I cannot find a way to add the static library and resources into a Qt Creator project.

          1 Reply Last reply
          0

          1/4

          4 Oct 2012, 00:56

          • Login

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