g2calc won't compile
January 08, 2010 —
BarryK
I have tried to compile g2calc version 0.13 created by disciple:
# cd src
# make
yacc -d --report=solved --report=itemset expcalc_par.y
conflicts: 44 reduce/reduce
flex expcalc_tok.l
gcc -c -o y.tab.o y.tab.c
In file included from expcalc_par.y:129:
expcalc_tok.l: In function 'yylex':
expcalc_tok.l:53: error: 'tE' undeclared (first use in this function)
expcalc_tok.l:53: error: (Each undeclared identifier is reported only once
expcalc_tok.l:53: error: for each function it appears in.)
make: *** [y.tab.o] Error 1
Hmmm, I downloaded g2calc original source, it compiles, but it doesn't work -- I click buttons, nothing displays. Oh well.
Comments
g2calcUsername: ttuuxxx
Hi Barry the orginal sources are located at http://ftp.uk.freesbie.org/sites/ftp.sourceforge.net/pub/sourceforge/g/project/g2/g2calc/g2calc/g2calc-alpha1/g2calc.tar.gz V12 by disciple http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=14131 works if you compile it, you have to manually click the bin file in /scr. If you try to make a .desktop file it doesn't launch, if you run it via terminal it doesn't launch and gives a glade error that it can't find the glade file, only by clicking the bin it works. Very strange calculator. ttuuxxx
g2calc
Username: disciple
"Sorry Barry, That's a remnant of my attempts to further improve the expression parsing, but I had a bit of a mixup when I uploaded that version. Very bad form. It will compile if you delete that line from expcalc_tok.l: "E" {yylval.double_t = 0; return tE;} What I hope to do when I get a chance will actually farm everything but the gui out to an existing program, which is well tested and by a competent author. As well as providing arbitrary precision support, this will mean I won't have to worry that I might have stuffed up the maths somewhere and made it produce wrong answers :) Your problem with the original source is interesting; I've had no problems across a lot of systems, except in Cygwin. I guess something is missing, faulty or incompatible in Qwerky. Does anything display if you use the precompiled binary? Do you know if other glade based programs are working? Galculator perhaps? > only by clicking the bin it works You've forgotten, Ttuuxxx :) It just needs to be started from the right place in relation to the pixmaps and the glade file. It is an unfinished product and a couple of the things that it is lacking are a proper build system and the use of proper file paths :) The original author wrote it partly because he couldn't find a calculator he liked, and partly to "learn gtk programming"...
G2calc is faulty
Username: BarryK
"disciple, There is nothing wrong with Quirky. Quirky is happy with other apps that use Glade. I deleted that line, and it compiled, and it works. I get text in the window. However, if I change to the other glade file, that uses pixmaps, then g2calc once again does not work properly, i.e., no text.
Glade error msg
Username: BarryK
"disciple, With the normal glade file, g2calc starts and there are no error messages in the terminal. However if I use the glade-with-pixmaps file, then when I start g2calc, a heap of error messsages get displayed, one for each key, like this: [i](g2calc:26155): libglade-WARNING **: could not find signal handler 'on_sqrt_button_clicked'.[/i]
I didn't update the pixmap glade file for my last version
Username: disciple
"Yes, my last version has generalised input functions (to save code and allow more flexibility for choosing buttons to put in a glade file) but I only updated the other glade file, not the one with pixmaps, so that currently does not work. It is interesting that my version works but the original doesn't - my changes were mostly very minor and I didn't really change the underlying methods it was using.
Tags: puppy