GTK+, CYGWIN & MSW [oops]

kraken+spam@smousseland.com kraken+spam@smousseland.com
Sun Apr 10 12:49:00 GMT 2005


>>
>> 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 :

http://prdownloads.sourceforge.net/gladewin32/gtk-win32-devel-2.6.4- 
rc2.exe?download

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
endif

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 :
http://prdownloads.sourceforge.net/gladewin32/gtk-win32-2.6.4-rc2.exe? 
download

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.

Kraken.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050410/8204cd95/attachment.bin>


More information about the Cygwin mailing list