Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Several questions with QtCreator [Solved]

    Tools
    2
    5
    3088
    Loading More Posts
    • 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
      Davita last edited by

      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 Reply Quote 0
      • L
        loladiro last edited by

        [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 Reply Quote 0
        • D
          Davita last edited by

          Thanks loladiro, your post was helpful :)

          1 Reply Last reply Reply Quote 0
          • L
            loladiro last edited by

            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 Reply Quote 0
            • L
              loladiro last edited by

              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 Reply Quote 0
              • First post
                Last post