Suite au même problème :
voila la solution :
création de variables d'environnement contenant le résultat des commandes 
	
	| 12
 3
 
 |  
pkg-config --cflags gtk+-2.0 
pkg-config --libs gtk+-2.0 | 
 
_________________________________________________________________
on windows, you can't do 
unless you're using cygwin or msys because the windows shell (cmd) doesn't support 
backtick  syntax. 
also, all you need to add to %PATH% is C:\GTK\bin. 
what I do (since msys doesn't work on vista x64) is to type 
	
	| 12
 3
 
 |  
pkg-config --cflags gtk+-2.0 > cflags.txt 
pkg-config --libs gtk+-2.0 > ldflags.txt | 
 then copy the contents of cflags.txt into a new environment variable called GTK_CFLAGS 
and copy the contents of ldflags.txt into a new environment variable called GTK_LDFLAGS, 
then I make a new var called GTK_COMPILE which has this in it: 
	
	| 12
 
 |  
%GTK_CFLAGS% %GTK_LDFLAGS% | 
 then when I want to compile a gtk program, I can type: 
	
	| 12
 
 |  
gcc file.c -o file.exe %GTK_COMPILE% | 
 
On peut aussi compiler "directement" en faisant
	
	| 12
 
 |  
gcc file.c -o file.exe %GTK_CFLAGS% %GTK_LDFLAGS% | 
 
J'ai trouvé cela ici.
Pour moi cela fonctionne correctement
A+
						
					
Partager