Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old May 16, 2007, 17:04   #1
GSN
Rookie
 
Join Date: Apr 2007
Posts: 21
GSN is on a distinguished road
main-gtk2.c

I can't manage to compile Angband (actually ToME) with the gtk-2 interface enabled. Here's the compiler output:

main-gtk2.c:174: error: expected specifier-qualifier-list before ‘PangoContext’
main-gtk2.c: In function ‘resize_tiles_fast’:
main-gtk2.c:1468: warning: value computed is not used
main-gtk2.c: In function ‘load_xpm’:
main-gtk2.c:1833: warning: value computed is not used
main-gtk2.c:1836: warning: value computed is not used
main-gtk2.c:1850: warning: value computed is not used
main-gtk2.c:1853: warning: value computed is not used
main-gtk2.c: In function ‘Term_nuke_gtk’:
main-gtk2.c:2484: error: ‘pango_info’ has no member named ‘analysis’
main-gtk2.c:2485: error: ‘pango_info’ has no member named ‘analysis’
main-gtk2.c: In function ‘Term_text_gtk’:
main-gtk2.c:2633: error: ‘PangoGlyphString’ undeclared (first use in this function)
main-gtk2.c:2633: error: (Each undeclared identifier is reported only once
main-gtk2.c:2633: error: for each function it appears in.)
main-gtk2.c:2633: error: ‘glyph_string’ undeclared (first use in this function)
main-gtk2.c:2633: warning: implicit declaration of function ‘pango_glyph_string_new’
main-gtk2.c:2636: warning: implicit declaration of function ‘pango_shape’
main-gtk2.c:2636: error: ‘pango_info’ has no member named ‘analysis’
main-gtk2.c:2639: warning: implicit declaration of function ‘gdk_draw_glyphs’
main-gtk2.c:2642: error: ‘pango_info’ has no member named ‘font’
main-gtk2.c:2644: error: ‘pango_info’ has no member named ‘ascent’
main-gtk2.c:2648: warning: implicit declaration of function ‘pango_glyph_string_free’
main-gtk2.c: In function ‘init_font_metrics’:
main-gtk2.c:3540: error: ‘pango_info’ has no member named ‘metrics’
main-gtk2.c:3540: warning: implicit declaration of function ‘pango_font_get_metrics’
main-gtk2.c:3541: error: ‘pango_info’ has no member named ‘font’
main-gtk2.c:3541: error: ‘pango_info’ has no member named ‘language’
main-gtk2.c:3553: warning: implicit declaration of function ‘pango_font_metrics_get_ascent’
main-gtk2.c:3553: error: ‘pango_info’ has no member named ‘metrics’
main-gtk2.c:3554: warning: implicit declaration of function ‘pango_font_metrics_get_descent’
main-gtk2.c:3554: error: ‘pango_info’ has no member named ‘metrics’
main-gtk2.c:3555: warning: implicit declaration of function ‘pango_font_metrics_get_approximate_digit_width’
main-gtk2.c:3555: error: ‘pango_info’ has no member named ‘metrics’
main-gtk2.c:3557: error: ‘pango_info’ has no member named ‘ascent’
main-gtk2.c:3557: warning: implicit declaration of function ‘PANGO_PIXELS’
main-gtk2.c:3558: error: ‘pango_info’ has no member named ‘descent’
main-gtk2.c:3559: error: ‘pango_info’ has no member named ‘ascent’
main-gtk2.c:3559: error: ‘pango_info’ has no member named ‘descent’
main-gtk2.c: In function ‘load_font’:
main-gtk2.c:3587: error: ‘pango_info’ has no member named ‘font_desc’
main-gtk2.c:3587: warning: implicit declaration of function ‘pango_font_description_from_string’
main-gtk2.c:3590: warning: implicit declaration of function ‘gtk_widget_modify_font’
main-gtk2.c:3590: error: ‘pango_info’ has no member named ‘font_desc’
main-gtk2.c:3593: error: ‘pango_info’ has no member named ‘context’
main-gtk2.c:3593: warning: implicit declaration of function ‘gtk_widget_get_pango_context’
main-gtk2.c:3596: error: ‘pango_info’ has no member named ‘language’
main-gtk2.c:3596: warning: implicit declaration of function ‘pango_context_get_language’
main-gtk2.c:3596: error: ‘pango_info’ has no member named ‘context’
main-gtk2.c:3599: error: ‘pango_info’ has no member named ‘font’
main-gtk2.c:3599: warning: implicit declaration of function ‘pango_context_load_font’
main-gtk2.c:3600: error: ‘pango_info’ has no member named ‘context’
main-gtk2.c:3601: error: ‘pango_info’ has no member named ‘font_desc’
main-gtk2.c:3606: error: ‘PangoAnalysis’ undeclared (first use in this function)
main-gtk2.c:3606: error: ‘analysis’ undeclared (first use in this function)
main-gtk2.c:3606: error: expected expression before ‘)’ token
main-gtk2.c:3609: error: ‘PangoAttrList’ undeclared (first use in this function)
main-gtk2.c:3609: error: ‘attrs’ undeclared (first use in this function)
main-gtk2.c:3609: warning: implicit declaration of function ‘pango_attr_list_new’
main-gtk2.c:3610: error: ‘PangoAttrIterator’ undeclared (first use in this function)
main-gtk2.c:3610: error: ‘aiter’ undeclared (first use in this function)
main-gtk2.c:3610: warning: implicit declaration of function ‘pango_attr_list_get_iterator’
main-gtk2.c:3613: warning: implicit declaration of function ‘pango_itemize’
main-gtk2.c:3613: error: ‘pango_info’ has no member named ‘context’
main-gtk2.c:3613: warning: initialization makes pointer from integer without a cast
main-gtk2.c:3616: error: ‘PangoItem’ undeclared (first use in this function)
main-gtk2.c:3616: error: ‘item’ undeclared (first use in this function)
main-gtk2.c:3616: error: expected expression before ‘)’ token
main-gtk2.c:3621: error: ‘pango_info’ has no member named ‘font’
main-gtk2.c:3627: error: ‘pango_info’ has no member named ‘analysis’
main-gtk2.c:3630: warning: implicit declaration of function ‘pango_item_free’
main-gtk2.c: In function ‘change_font_event_handler’:
main-gtk2.c:3651: error: ‘GTK_RESPONSE_OK’ undeclared (first use in this function)
main-gtk2.c:3651: warning: implicit declaration of function ‘gtk_dialog_run’
main-gtk2.c: In function ‘setup_menu_paths’:
main-gtk2.c:4692: error: invalid lvalue in assignment
main-gtk2.c:4698: error: invalid lvalue in assignment
make: *** [main-gtk2.o] Błąd 1

Yes, I have posted that to the ToME forum too.
GSN is offline   Reply With Quote
Old May 16, 2007, 17:11   #2
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 39
Posts: 779
pav is on a distinguished road
Send a message via ICQ to pav
What version of T.o.M.E.? What version of pango?
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old May 16, 2007, 17:35   #3
GSN
Rookie
 
Join Date: Apr 2007
Posts: 21
GSN is on a distinguished road
ToME 2.3.4, actually the Unicode patch I was so keen on seeing in action was for 2.3.1, but patched without any problems.

I have installed all the gtk dev packages plus libpango1.0-dev, maybe it's not the right one? Linux's Ubuntu, by the way.
GSN is offline   Reply With Quote
Old May 16, 2007, 18:54   #4
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 39
Posts: 779
pav is on a distinguished road
Send a message via ICQ to pav
What command you used to start compilation? I downloaded 2.3.4 sources, and main-gtk2.c is not referenced in any makefile...
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old May 16, 2007, 19:37   #5
GSN
Rookie
 
Join Date: Apr 2007
Posts: 21
GSN is on a distinguished road
Makefile.std. Actually I edited it to add that file instead of main-gtk.c. Should I include main-gtk.c too?

Edited Makefile flags:

COPTS = -Wall -O1 -pipe -g
INCLUDES = `gtk-config --cflags`
DEFINES = -DUSE_TRANSPARENCY -DUSE_EGO_GRAPHICS -DSUPPORT_GAMMA -DUSE_GCU -DUSE_GTK2
LIBS = `gtk-config --libs` -lncurses

gtk-config produces correct output.
GSN is offline   Reply With Quote
Old May 16, 2007, 19:48   #6
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 39
Posts: 779
pav is on a distinguished road
Send a message via ICQ to pav
I doubt it. gtk-config should give you Gtk+ 1.X flags. You need pkg-config --cflags --libs gtk+-2.0
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old May 16, 2007, 21:17   #7
GSN
Rookie
 
Join Date: Apr 2007
Posts: 21
GSN is on a distinguished road
So in short I was trying to compile a GTK 2.x application using GTK 1.x libs. Just brilliant. Anyway, with your suggestion I managed to compile, even though

main-gtk2.c:4692: error: invalid lvalue in assignment
main-gtk2.c:4698: error: invalid lvalue in assignment

kept on appearing (just deleted a cast to cptr)

But when I ran ToME under X, a strange thing happened - the game used -mxaw instead of -mgtk2, even though I did not compile it in! It also totally ignored -mgtk2 on command line. I fired up gdb to check what's wrong, and lo and behold, -mgtk2 mysteriously worked.

Obviously the patch is not finished - there is no way to use unicode values using the % command. And I wonder how does Windows implement it? FNT files are limited to 256 glyphs anyway.
GSN is offline   Reply With Quote
Old May 18, 2007, 04:49   #8
Neil Stevens
Scout
 
Neil Stevens's Avatar
 
Join Date: May 2007
Location: California
Posts: 26
Neil Stevens is on a distinguished road
Quote:
Originally Posted by GSN View Post
I can't manage to compile Angband (actually ToME) with the gtk-2 interface enabled. Here's the compiler output:
I'm pretty sure that interface isn't maintained. And applying some patch is probably going to give you no end of troubles. Have fun, heh.
Neil Stevens is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.