PDA

View Full Version : .glade to .c > can someone give me some insight?



Get_Ya_Wicked_On
December 21st, 2006, 08:53 PM
Ok, so I have a .glade project file. I want to convert it to a .c file so I can compile it with gtk+.

Now, I understand that .glade is a .xml file that can be converted using libglade?

Well I have libglade installed and I have tried:



gcc program.glade -o program `pkg-config --cflags --libs libglade-2.0`


... but to no avail. It says it can not recognize the file type.

Can anyone shed some light? I've looked at a few 'tutorials' which do not assist.

BTW, I'm using the new Glade 3 which is a lot different than the version in the tutorials I've read.

I understand it doesn't have the "automatic build" c file deal it had before. I appreciate your efforts.

lnostdal
December 21st, 2006, 10:04 PM
Ok, so I have a .glade project file. I want to convert it to a .c file so I can compile it with gtk+.

Now, I understand that .glade is a .xml file that can be converted using libglade?

Well I have libglade installed and I have tried:



gcc program.glade -o program `pkg-config --cflags --libs libglade-2.0`


... but to no avail. It says it can not recognize the file type.

Can anyone shed some light? I've looked at a few 'tutorials' which do not assist.

BTW, I'm using the new Glade 3 which is a lot different than the version in the tutorials I've read.

I understand it doesn't have the "automatic build" c file deal it had before. I appreciate your efforts.

Do not generate source code from glade.

Instead, generate .xml-files (data) then load it into your application using libglade.

Start here: http://developer.gnome.org/doc/API/libglade/libglade-notes.html .. the page mentions separation of program-code from interface-code; which is a good thing.

edit: i don't think i read your post properly .. but ok

Get_Ya_Wicked_On
December 21st, 2006, 10:11 PM
Yes, I was aware to not use the automatic code generated.

Just needed something like that link. Thanks.