This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GTK+, CYGWIN & MSW [oops]

I have finally got an application to compile under cygwin, but to run it I have to launch the X server, 'startx' to be able to run the program under cygwin. However, I am not able to run the program form windows, I have added the 'cygwin.dll' and 'cygX11-6.dll' directories to the 'autoexec.bat' '%path%'. the program just does not run. What can I do to get this fixed?

If you want to have a packaged windows application which don't need cygwin installation to run with native GTK (not X11), you have to install gtk for windows dev from there :

in c:\cygwin\usr\local\gtk for exemple.

in you Makefile you could define gtk path to use in the Makefile :

ifeq ($(origin GTK_PATH),undefined)
#windows version
GTK_PATH = /usr/local/gtk/bin
#X11 version
#GTK_PATH = /usr/bin

to get correct gtk flags, compil with
>gcc â$(GTK_PATH)/pkg-config --cflags gtk+-2.0â [your stuff here]

and link with
>gcc `$(GTK_PATH)/pkg-config --libs gtk+-2.0` [your stuff here]

To have a real windows application, you have to compil at link stage with
>gcc -e _mainCRTStartup -mwindows file.res [your stuff here]

file.res is optional, put your windows icon file in it.

With this, you will get a full native windows application, provided you bundle required cygwin dll with it, and gtk runtime is installed on the computer from there :

You don't need to install it if you installed the devel version on your computer, but have to install it on other computers you will install your software on.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]