I am using MinGW
and I have set the path for the same in the Environment Variables
. I have also set the path for GTK
in the Environment Variables
.
- MInGW has been set up successfully since I am able to use the
gcc
commands to compile regular C programs. - Even
GTK
has been set up successfully (confirmed by enteringpkg-config --cflags gtk+-3.0
in cmd which prints out a list of variables and also ran a already compiledGTK
application succesfully).
I have also set the path for pkgconfig
in the Environment Variables
.
- Variable Name-
PKG_CONFIG_PATH
and Value-C:\gtk\lib\pkgconfig
Even after the complete set up, there are some errors which occur when I try compiling a GTK
program.
Command used:
gcc hello.c -o hello 'pkg-config --cflags --libs gtk+-3.0'
Note: I have used ` in the actual command and not '(used ' here to prevent highlighting).
Errors:
pkg-config no such directory found. gtk+-3.0 no such directory found unrecognized command line option --cflags unrecognized command line option --labs
Tools I tried:
- Windows cmd
- MingW Shell
- MSYS2
- Cygwin Terminal (I haven't set up Cygwin path in the environment variables to prevent errors between Cygwin and MingW)
Can someone help me in figuring out what's the actual issue even after completing all the set up steps I mentioned above? Please help me!
Forums I already checked out:
- Compiling and running GTK+ application on Windows 7
- http://www.tarnyko.net/repo/gtk3_build_system/tutorial/gtk3_tutorial.htm And more...But nothing has helped me so far!