This is the mail archive of the
mailing list for the Cygwin project.
Re: GTK+, CYGWIN & MSW [oops]
- From: kraken+spam at smousseland dot com
- To: cygwin at cygwin dot com
- Date: Sun, 10 Apr 2005 11:51:26 +0200
- Subject: Re: GTK+, CYGWIN & MSW [oops]
- References: <BAY24-F314F8C7B36D9FCF5583648A6310@phx.gbl>
- Reply-to: cygwin at cygwin dot com
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)
GTK_PATH = /usr/local/gtk/bin
#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.