WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: GTK+3 drawing area not displaying properly  (Read 2679 times)

Offline Zill

  • Newbie
  • *
  • Posts: 25
GTK+3 drawing area not displaying properly
« on: August 01, 2014, 01:17:58 PM »
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.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: GTK+3 drawing area not displaying properly
« Reply #1 on: August 01, 2014, 10:27:23 PM »
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.

Offline Zill

  • Newbie
  • *
  • Posts: 25
Re: GTK+3 drawing area not displaying properly
« Reply #2 on: August 04, 2014, 11:39:53 AM »
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.