0

I'm relatively new with GTK C++ and building software in general. My question is about the end user of a software with GTK in Windows. In the documentation it says: "end-users do not need to worry about how to install GTK itself."

But at the end of the documentation it says: "To run GTK programs you will also need:" + several dependencies (gettext-runtime, fontconfig, freetype, expat, libpng, zlib).

My question is obvious. Does the end user need to install those dependencies by himself? If so : How can I create an installer that installs(or incorporates) those dependencies, if they are not installed?

Thank you very much in advance.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
FER31
  • 76
  • 8
  • I am not familiar with GTK C++, but I assume those are dll libraries that are needed for a binary compiled with GTK (actual or potential dependencies). Unless you statically link - not sure what features are for that in GTK C++. I have [this answer on dependency scanning for Windows binaries](https://stackoverflow.com/a/51940598/129130). You can use tools such as this to work out dependency issues for binaries you compile. For testing, run on a clean virtual machine. Those are perfect for dependency testing. Suggest you keep it up to date with OS security fixes. – Stein Åsmul Oct 10 '19 at 13:44
  • If they are redistributable, you include such DLL files in the installation folder of your binary. If they are installed as shared runtimes you include that runtime. If they can statically link you do that if you need it. All depends. – Stein Åsmul Oct 10 '19 at 13:50
  • Thank you very much for the response and sorry if I say something crazy. I guess it depends on each of these libraries have a shared building. I must investigate. In the case that they are all Dll, I would have to create a setup to put them in a directory? Pardon my ignorance. I like to program, but I have no idea about building. – FER31 Oct 10 '19 at 18:24
  • Yes, you would need to make a setup. [Some MSI setup tools](https://stackoverflow.com/a/50229840/129130). To get going testing, it is easiest to copy the build binaries to a test virtual (manually, without making a setup), and then try to launch. If you see problems, use the [dependency debugging tools](https://stackoverflow.com/a/51940598/129130) to work out what files or registrations are missing. There are many [different dependency types](http://www.dependencywalker.com/help/html/dependency_types.htm). – Stein Åsmul Oct 10 '19 at 18:44
  • O, Thank you very much for all the information and links. The last questions if possible ... Is there a specific directory in Windows to put the .Dll ?. Is it necessary to specify the user's directory in some way on the IDE / Compiler / linker? – FER31 Oct 10 '19 at 19:52
  • It depends on what type of file it is. Win32 dlls can be put shared globally in system32, shared side-by-side in the WinSxS assembly directories (binary manifest invokes the correct version), locally and privately in the installation folder - dll next to your exe (do this if you can, it is easiest), and in a number of other shared folders that are too many to list (common files folders and such). COM files are globally registered via the registry, or use registrationless COM based on manifests. – Stein Åsmul Oct 10 '19 at 20:09
  • Sorry. I am working with Code::Blocks . Thanks. – FER31 Oct 10 '19 at 20:11
  • I am afraid I am not familiar with that tool, but the general concept is as stated above. You also have too little reputation to start a chat - just tried. – Stein Åsmul Oct 11 '19 at 10:03
  • Hi, sorry for the delay. I wrote the comment about Code :: Block before the enriching response of the Dll. I wrote it because, I understand that it is good to say the tools with which one works. As you have already proven my experience here is little.  One thing I did not understand is: Do you recommend .COM to place the Dll in the appropriate directory? Thank you very much again. – FER31 Oct 12 '19 at 09:56

0 Answers0