Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Several questions with QtCreator [Solved]

Several questions with QtCreator [Solved]

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 3.4k 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.
  • D Offline
    D Offline
    Davita
    wrote on last edited by
    #1

    I'm working on a project which should have GUI written in Qt. I'm thinking using QtCreator as a development IDE, but there are some problems I'm facing. The project should have a dll file which shouldn't be dependent on any qt library/module, it should use only winapi and it should be compiled with both x86 and x64. So my questions are:
    •Is it possible to use QtCreator to compile a dll which doesn't have any dependency on qt modules. If yes, how?
    •Is it possible to use MinGW x86 & x64 to compile a single project? If so, how can I specify which compiler to use?

    Although, every executable compiled from QtCreator has a dependency on LIBGCC_S_DW2-1.DLL and MSVCRT.DLL. Is it possible to remove a dependency on LIBGCC_S_DW2-1.DLL and link MSVCRT.DLL inside my exe/dll (just like MS VC does).
    This is my first project with Qt, and I'm not a C++ guru, so please describe the details as good as you can :-) Your help is much appreciated.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      loladiro
      wrote on last edited by
      #2

      [quote] Is it possible to use QtCreator to compile a dll which doesn’t have any dependency on qt modules. If yes, how? [/quote]
      Yes absolutely, if you want to use qmake, add the following to your .pro file:
      @
      QT -= core gui
      @
      [quote]
      Is it possible to use MinGW x86 & x64 to compile a single project? If so, how can I specify which compiler to use?
      [/quote]
      You'll have to add a seperate build configuration for each x86 and x64 and invoke it appropriately (you cann add build configurations in the "Projects" tab)
      [quote]
      Although, every executable compiled from QtCreator has a dependency on LIBGCC_S_DW2-1.DLL and MSVCRT.DLL. Is it possible to remove a dependency on LIBGCC_S_DW2-1.DLL and link MSVCRT.DLL inside my exe/dll (just like MS VC does).
      [/quote]
      IIRC, MinGW does not allow MSVCRT.DLL to be linked statically due to licensing issues. However on most windows machines I have encountered, it was already installed (AFAIK, it is part of the VC redist, so if it isn't available you can use that). As for libgcc, you can use
      @
      win32 {
      QMAKE_LFLAGS += -static-libgcc
      }
      @
      in your .pro file.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Davita
        wrote on last edited by
        #3

        Thanks loladiro, your post was helpful :)

        1 Reply Last reply
        0
        • L Offline
          L Offline
          loladiro
          wrote on last edited by
          #4

          No problem, feel free to ask any further questions. Also, could you please add [Solved] in front of the title (by editing the first post).

          1 Reply Last reply
          0
          • L Offline
            L Offline
            loladiro
            wrote on last edited by
            #5

            Forgot to mention one thing. To instruct qmake to not do anything Qt-spcific, you can/should also add:
            @
            CONFIG -= qt
            @
            to your .pro 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