0

I had made a C GTK program in Linux(simple gtk window program) and I have compiled it with mingw cross compiler in Linux mint with this way.now I had send the a.exe file to my windows 10 computer to execute it.but when I click on a.exe file in windows 10 it says

the program can't start because <some files that I have listed in notepad in scrennshot> is missing from your computer.try reinstalling the program to fix this problem

enter image description here

My windows 10 doesn't have gtk installed on it.Do I need to Install gtk In my windows 10 machine?

  • 1
    Either that or link statically. –  Aug 02 '17 at 10:19
  • @FelixPalmen I didn't understand what you mean?? –  Aug 02 '17 at 10:24
  • You must have the Gtk runtime on the windows 10 machine. It must be the same version as the one you compiled on linux. The Gtk runtime is a huge set of files, not only those listed there... as soon as you copy those, windows will complain for some more. Then you have the themes, etc... – José Fonte Aug 02 '17 at 10:44

1 Answers1

0

It could be because of linking executable against shared libraries instead of static libraries. Shared libraries which your program is linked with are on your linux only they do not exist on windows thus it cannot be run under windows. If you want to successfully cross compile your program you can either compile your program statically which makes it executable on windows however the resulting exe is quite large, or you could search for and install missing dlls on your windows then re run your program and see what happens.

About Gtk not being installed on your compter, Ofcourse you should install it first then check to see if other libraries are missing

HRN
  • 21
  • 4