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. Definition file with qt

Definition file with qt

Scheduled Pinned Locked Moved General and Desktop
definitionoutput-defdlldef
6 Posts 2 Posters 6.7k 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.
  • B Offline
    B Offline
    beranger
    wrote on last edited by koahnig
    #1

    Hello,
    I migrate a C++ program to Qt(mingw). The program is a library (dll) generated by QT.
    Before using Qt , i create three file : .dll,.a,.def.
    How could i still create the definition file with Qt? What change i have to do in my pro file.

    Thanks in advance

    Ps: I know the command in gcc is "--output-def,xxx.def"

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

      Hi and welcome to devnet

      The general question is if your dll is using Qt functionality?

      What you might perceive as Qt consists of different components.
      Initially and it still is, Qt names a set of library functions for GUI and non-GUI applications.
      In the mean time typical installation have also the added functionality of an Integrated Development Environment (IDE). This is IDE is Qt creator. There are other tools which iam leaving out here.

      You can continue to develop any application or dll with the Qt creator. You can also start a new development with Qt creator, but there is no requirement that your application is using functionality of Qt libs.

      It reads like you have an existing dll project, but you do not intend to use functionality of Qt. That is absolutely fine.
      The question is how you compiled your dll project before. Many external tools are also supported by Qt creator.

      Alternatively, you can also checkout and create a new test project for a dll. Go to "new project" -> "Libraries" -> "C++-Library". There are different options you can choose. When gone through this procedure, you will probably see what to do to continue your development.

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

      1 Reply Last reply
      0
      • B Offline
        B Offline
        beranger
        wrote on last edited by beranger
        #3

        @koahnig said:

        external tools

        HI thanks for welcoming,
        The reason i migrate is to use Qt functionnality.
        For creating the dll , i already done it by using "new project" -> "Libraries" -> "C++-Library" and that's work fine :).

        The only problem i have is created the definition file (xxx.def). And i really don't see in qt how to do this.

        Before using qt, I used to write myself makefile(gcc) and compile with gcc under mingw environnement .The specific command to create def file was this :
        "g++ -Wall yyy.o -o xxx.dll -s -shared xxx.o -Wl,--subsystem,windows,--output-def, xxx.def"

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

          @beranger
          Apparently you can use a the DEF_FILE statement in your .pro file. Unfortunately, the description is not detailed.
          I have found another old thread.

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

          B 1 Reply Last reply
          0
          • K koahnig

            @beranger
            Apparently you can use a the DEF_FILE statement in your .pro file. Unfortunately, the description is not detailed.
            I have found another old thread.

            B Offline
            B Offline
            beranger
            wrote on last edited by
            #5

            @koahnig
            Thanks for the help and link.
            Finally, i have done it by adding this line in pro :
            QMAKE_LFLAGS += -Wl,--output-def,release/cc_shared_memory.def

            K 1 Reply Last reply
            1
            • B beranger

              @koahnig
              Thanks for the help and link.
              Finally, i have done it by adding this line in pro :
              QMAKE_LFLAGS += -Wl,--output-def,release/cc_shared_memory.def

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              @beranger
              Glad to see that you have solved your problem.
              At the button after the last post you see the "Topic Tools". Please open it and mark your post as solved.

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

              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