General TC > Programming & Scripting - Unofficial
GTK+3 drawing area not displaying properly
(1/1)
Zill:
I am trying to create a program using GTK+ and C. From a fresh copy of Core Plus, I have installed gcc.tcz, gtk3-dev.tcz, and compiletc.tcz. I then tried some sample applications from the website. The basic hello world(https://developer.gnome.org/gtk3/stable/gtk-getting-started.html) works, and I then tried the basic drawing program(https://developer.gnome.org/gtk3/stable/ch01s03.html). When I compile the program I get no errors, but the drawing area widget does not show up. I have tried the same exact code on an Ubuntu system and it runs just fine so I know that part is okay. I am still new to creating things without an IDE so I am not sure where to go from here. Is there some dependency that I am missing? How would I figure that out? Any help would be greatly appreciated. Thanks.
Pats:
Hi,
I am not abt your exact problem, but you can try:
gcc main.c -o main `pkg-config --cflags --libs gtk+2.0`
Note: before `pkg-config... , there is back-tick or tilde - key above Tab key.
Or try,
gcc -Wall -g main.c -o main `gtk-config --cflags` `gtk-config --libs'
Or use,
-I and -L for Include path or Library path options.
And best Google for the all other options, for Widgets compiling.
Hope this helps.
Zill:
I managed to get the program to work. Originally I had never set a value for xvesa and thought it's default value would be fine. So now I have added "xvesa=1280x1024x16" to my list of bootcodes and everything is okay.
Navigation
[0] Message Index
Go to full version