I have written a GUI using gtkmm (the C++ language wrapper for GTK+). I have been able to find the .dlls that the .exe. file depends upon, and make a basic installer using NSIS. However, I am having trouble distributing the application to other Windows devices. As I am completely new to this, does anyone have advice as to how to properly distribute the application? All I really need to do is download it on a few other PCs. Thanks!
Asked
Active
Viewed 358 times
0
-
You need to distribute your compilers runtime libraries, and any other libraries you are using, along with your program. – Jesper Juhl Jul 13 '20 at 17:50
-
You executed the installer in another machine and it works? It is the application who fails? – Manuel Jul 13 '20 at 17:52
-
@Manuel If I do not include the .dlls, the application fails and says "missing ____.dll" for whatever files it cannot find. But when I include all the .dll files in the same directory as the .exe file, the application fails with a Gdk related error – Liam Ward Jul 13 '20 at 18:20
-
@LiamWard can you show the error? – Manuel Jul 13 '20 at 18:23
-
@Manuel Thanks for your help, the Gdk error I get when all the .dll files are included in the same directory as the .exe is "terminate called after throwing an instance of Gdk::PixbufError". However, that error doesn't show up on the original machine where I developed the application, and I have checked that all of the images I load are in the same directory as the .exe. – Liam Ward Jul 13 '20 at 18:53
-
@JesperJuhl Is there any way to figure out exactly which files I need to include? – Liam Ward Jul 13 '20 at 19:36
-
@LiamWard The list is too long to show here but you have one [here](http://www.tarnyko.net/repo/gtk3_build_system/tutorial/gtk3_tutorial.htm) in "Bundle content files list" section. – Manuel Jul 14 '20 at 12:27
2 Answers
0
Try to catch the exception and look at Gdk::PixbufError::code()
or Gdk::PixbufError::what()
to see why it throws.
You have several codes:
CORRUPT_IMAGE,
INSUFFICIENT_MEMORY,
BAD_OPTION,
UNKNOWN_TYPE,
UNSUPPORTED_OPERATION,
FAILED,
INCOMPLETE_ANIMATION
Images in the development machine are in the same directory as the build .exe
?
Also, if you run the app from an icon, shortcut or similar, the current directory may not be the same as the .exe
.

Manuel
- 2,526
- 1
- 13
- 17
-1
That happened to me when I packaged the wrong DLL versions (I've multiple copies of GTK DLLs due to multiple apps the uses different version)
Use ldd mygtkapp.exe
on msys2
console/terminal to make sure you have the correct DLL versions packaged with your app.

Mj Mendoza IV
- 9
- 1