Compiling and running GTK+ application on Windows 7

后端 未结 3 539
独厮守ぢ
独厮守ぢ 2020-12-10 00:05

System: Windows7, 32 bit, GTK 2.24.10, mingw
I am trying to write basic helloworld.c type GTK based application. However, it doesn\'t run.
These are the steps which

3条回答
  •  自闭症患者
    2020-12-10 00:38

    Get same error when running hello, world program. Following solution work for me.

    Instead of saving your helloworld.c at any arbitrary place, put it inside of

    MinGW > msys > 1.0 > home > "Name of Your home folder" > helloworld.c

    Now, open msys.bat and write the command to run program. In my case it was:

    gcc hello.c -o hello `pkg-config --cflags --libs gtk+-3.0`
    

    And it works for me!

提交回复
热议问题