help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to compile/link simple calculator example


From: David Coste
Subject: Re: Unable to compile/link simple calculator example
Date: Thu, 7 May 2009 18:35:12 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Solved.
Just added an include "stdlib.h" in calc.y.
Also added a -lm in the Makefile to avoid undefined "pow" and "sqrt" symbol errors.

Sorry for the inconvenience.

David Coste wrote:
Hello everybody,

I'm trying to compile the simple calculator provided in this message :
http://www.mail-archive.com/address@hidden/msg00156.html

I get this message :

calc.y: In function ‘calc_parse’:
calc.y:26: warning: incompatible implicit declaration of built-in
function ‘printf’
calc.y:28: error: ‘EXIT_SUCCESS’ undeclared (first use in this function)
calc.y:28: error: (Each undeclared identifier is reported only once
calc.y:28: error: for each function it appears in.)
calc.y:30: warning: incompatible implicit declaration of built-in
function ‘printf’
calc.y: In function ‘calc_error’:
calc.y:68: error: ‘EXIT_FAILURE’ undeclared (first use in this function)

Could someone please help me to solve this problem ?
Should I use specific gcc / flex / bison flags ?

I am using, gcc (Ubuntu 4.3.2-1ubuntu12) 4.3.2,
flex 2.5.35
and bison (GNU Bison) 2.3

Thanks in advance.
David.


This message, including attachments, is intended solely for the addressee 
indicated in this message and is strictly confidential or otherwise Privileged. 
If you are not the intended recipient (or responsible for delivery of the 
message to such person) : - (1) please immediately (i) notify the sender by 
reply email and (ii) delete this message and attachments, - (2) any use, copy 
or dissemination of this transmission is strictly prohibited. If you or your 
employer does not consent to Internet email messages of this kind, please 
advise Purple Labs by reply e-mail immediately. Opinions, conclusions and other 
information expressed in this message are not given or endorsed by Purple Labs 
unless otherwise indicated by an authorized representative independent of this 
message.


_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison





reply via email to

[Prev in Thread] Current Thread [Next in Thread]