Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. alternative to ilmerge but for c++?
Forum Updated to NodeBB v4.3 + New Features

alternative to ilmerge but for c++?

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
11 Posts 5 Posters 4.3k Views 3 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.
  • RIVOPICOR Offline
    RIVOPICOR Offline
    RIVOPICO
    wrote on last edited by RIVOPICO
    #1

    Hi all. i'm searchin some way to embed my dll's like embedded resource in c++ like ianyone can do in other languages like net . The problem is that my program/project require some dependencies (they are in native) and need to put them like embedded resource just simple. I read some projects in github that they said is possible but still i didnt get any advance.
    Someone knows how i can do this task to add my dependecies like embedded resource?
    Can not be static library because they are just objects and can not works like resources? My libraries (dll's) are in c++ and the project/program is in c++ too.

    aha_1980A 1 Reply Last reply
    0
    • RIVOPICOR RIVOPICO

      Hi all. i'm searchin some way to embed my dll's like embedded resource in c++ like ianyone can do in other languages like net . The problem is that my program/project require some dependencies (they are in native) and need to put them like embedded resource just simple. I read some projects in github that they said is possible but still i didnt get any advance.
      Someone knows how i can do this task to add my dependecies like embedded resource?
      Can not be static library because they are just objects and can not works like resources? My libraries (dll's) are in c++ and the project/program is in c++ too.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @RIVOPICO said in alternative to ilmerge but for c++?:

      Someone knows how i can do this task to add my dependecies like embedded resource?

      That is, as you already stated, indeed called static linking in C++. For the Qt libraries, the procedure is described here: http://doc.qt.io/qt-5/deployment.html

      Please note that this will require a commercial Qt licence, as the (L)GPL requires that your users can exchange these libraries.

      Qt has to stay free or it will die.

      RIVOPICOR 1 Reply Last reply
      1
      • aha_1980A aha_1980

        @RIVOPICO said in alternative to ilmerge but for c++?:

        Someone knows how i can do this task to add my dependecies like embedded resource?

        That is, as you already stated, indeed called static linking in C++. For the Qt libraries, the procedure is described here: http://doc.qt.io/qt-5/deployment.html

        Please note that this will require a commercial Qt licence, as the (L)GPL requires that your users can exchange these libraries.

        RIVOPICOR Offline
        RIVOPICOR Offline
        RIVOPICO
        wrote on last edited by
        #3

        @aha_1980 i need like embedded resource not static linking. i mean linked objects in my case is not the purpose. it's just embedded resource. and it's not impossible

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #4

          There are multiple options depending on which particular technology you use.
          Some examples include:
          If you're using Qt: Qt Resource System
          If you're using MSVC: Resource files
          If you're using wxWidgets: XRC
          If you're using CMake: embed-resource

          There are probably many more. Just do a search containing words c++, resource and your favorite library or compiler or framework and you'll get many results to choose from.

          1 Reply Last reply
          2
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi
            So once the DLLS are compiled into the exe.
            What do you plan to do with them?
            Its not runnable when embedded resource so i wonder what
            use they can have ?

            RIVOPICOR 2 Replies Last reply
            2
            • RIVOPICOR Offline
              RIVOPICOR Offline
              RIVOPICO
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • mrjjM mrjj

                Hi
                So once the DLLS are compiled into the exe.
                What do you plan to do with them?
                Its not runnable when embedded resource so i wonder what
                use they can have ?

                RIVOPICOR Offline
                RIVOPICOR Offline
                RIVOPICO
                wrote on last edited by RIVOPICO
                #7

                @mrjj it's just because i was searching some alternative to ilmerge but for c++. but i think the only way actually is doing it manually.

                1 Reply Last reply
                0
                • mrjjM mrjj

                  Hi
                  So once the DLLS are compiled into the exe.
                  What do you plan to do with them?
                  Its not runnable when embedded resource so i wonder what
                  use they can have ?

                  RIVOPICOR Offline
                  RIVOPICOR Offline
                  RIVOPICO
                  wrote on last edited by RIVOPICO
                  #8

                  @mrjj and yes it's very useful because i remeber that in the old times when i tried to make a static compilation with qt took my longtime (make the compiler static) . and if you check how much time you need to use ilmerge, 3 minuts.
                  but obviously this is only for net and maybe the people just dont need to compile again to add your static libraries if you have the dll merging them must to be enough.

                  1 Reply Last reply
                  0
                  • Pablo J. RoginaP Offline
                    Pablo J. RoginaP Offline
                    Pablo J. Rogina
                    wrote on last edited by
                    #9

                    @RIVOPICO could you please state your requirements? From what I understand so far, it looks like you're trying to do something in Qt/C++ which applies only to .Net. From [ilmerge documentation](link url):

                    ILMerge takes a set of input assemblies and merges them into one target assembly. The first assembly in the list of input assemblies is the primary assembly. When the primary assembly is an executable, then the target assembly is created as an executable with the same entry point as the primary assembly.

                    So for me, the equivalent to such action in Qt/C++ is static linking as @aha_1980 already pointed out.

                    But if you still need imperiously your .DLLs as "embedded resources" you could freely add such files to a Qt resource (.qrc) which will end up embedded in your resulting .exe like icons or translation files are used for instance. However, I'm not sure you'll be able to use the DLLs via the resource path i.e. ":/path/to/myDLL". At any time, given the DLLs are not required at the very beginning of your application, you could still save the contents of the resource into actual files.

                    All in all, it looks like you're trying to do something that's not usual in Qt/C++ and the cost/benefit isn't clear for me as I may be missing your actual intent/requirement.

                    Upvote the answer(s) that helped you solve the issue
                    Use "Topic Tools" button to mark your post as Solved
                    Add screenshots via postimage.org
                    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                    RIVOPICOR 1 Reply Last reply
                    2
                    • Pablo J. RoginaP Pablo J. Rogina

                      @RIVOPICO could you please state your requirements? From what I understand so far, it looks like you're trying to do something in Qt/C++ which applies only to .Net. From [ilmerge documentation](link url):

                      ILMerge takes a set of input assemblies and merges them into one target assembly. The first assembly in the list of input assemblies is the primary assembly. When the primary assembly is an executable, then the target assembly is created as an executable with the same entry point as the primary assembly.

                      So for me, the equivalent to such action in Qt/C++ is static linking as @aha_1980 already pointed out.

                      But if you still need imperiously your .DLLs as "embedded resources" you could freely add such files to a Qt resource (.qrc) which will end up embedded in your resulting .exe like icons or translation files are used for instance. However, I'm not sure you'll be able to use the DLLs via the resource path i.e. ":/path/to/myDLL". At any time, given the DLLs are not required at the very beginning of your application, you could still save the contents of the resource into actual files.

                      All in all, it looks like you're trying to do something that's not usual in Qt/C++ and the cost/benefit isn't clear for me as I may be missing your actual intent/requirement.

                      RIVOPICOR Offline
                      RIVOPICOR Offline
                      RIVOPICO
                      wrote on last edited by RIVOPICO
                      #10

                      @Pablo-J.-Rogina i just say that if it exist some alternative to ilmergue but for c++ will make the life more easy to the developers. jus that i am not talking abouyt money i know static linking and how much effor you need to make static linking configurating msvc or visual studio or mingw (the compiler) to do the static linking correctly and this could be just solved in few step's if it would exist one alternative to ilmergue but for c++. In net , the most used language in the majority is because just if you have dependencies in question of seconds you solve this problem. this in c++ doesnt happen. sorry for my late answer.

                      1 Reply Last reply
                      0
                      • mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        Hi
                        For a tool to work like ilmerge for c++, it would have to have static Qt for any platform supported. Huge amount of work so its not likely it will ever happen.

                        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