1

After building a GUI application using GTK+ / C language, I noticed that I have to distribute tons of DLLs of the GTK library with my application. Is there a way to make a single executable file (.exe)? Maybe by re-compiling the library itself with my program or some thing like that?

rici
  • 234,347
  • 28
  • 237
  • 341
  • 1
    That is called a *static* build, where you link with libraries statically. That means all code needed will be in the executable, but it will also be very large. How to enable it depends on your compiler and environment. – Some programmer dude Sep 15 '17 at 22:15
  • Thanks for your comment . No matter how large it will be , i'm very interesting in doing this . IDE : Code::Blocks OS : Windows 7 , x86 –  Sep 15 '17 at 22:37
  • I have no experience with Code::Blocks my self, other than I know it's using GCC for its compiler, and for that you can specify a `-static` linker option. If there's no such toggle in the projects linker settings, then add it manually. – Some programmer dude Sep 15 '17 at 22:38
  • THe Gtk stack is not designed to be statically linked. Just ship the dlls in a bundle. – TingPing Sep 15 '17 at 23:00

0 Answers0