?
Solved

Compiling in visual C++ 2005 express edition

Posted on 2009-04-12
5
Medium Priority
?
347 Views
Last Modified: 2013-12-14
I am using yacc for parser generator it has in it include folder which has all the header files required to compile my program which has been generated by yacc itself.Since I do not know how to include the path the error Now i am getting is
Cannot open include file: 'yyglobal.h': No such file or directory

Please help me how to solve this
0
Comment
Question by:majinharish
  • 3
  • 2
5 Comments
 
LVL 19

Accepted Solution

by:
alb66 earned 1500 total points
ID: 24135853
From the menù Project click on Properties.
Then select "Configuration properties|C/C++|General" and add the folder where "yyglobal.h" is to "Additional Include Directories"


include.JPG
0
 

Author Comment

by:majinharish
ID: 24139188
Thanks i did just what you said now I am getting a different error
fatal error C1083: Cannot open include file: '.\cac.h': No such file or directory

Actually i am trying to compile the C code generated from YACC

My lex code is this




%{
#include <ctype.h>
%}
%%
%token DIGIT
ine: expr '\n'  { printf("%d\n",$1}
;
expr: expr'+'term {$$=$1+$3;}
|term
;
term:term'*'factor {$$=$1+$3;}
|factor
;
factor: '('expr')' {$$=$2;}
|DIGIT
;
%%
yylex(){
int c;
c=getchar();
if(isdigit(c)){
yyval=c-'0';
return DIGIT;
}
return c;
}

Open in new window

0
 

Author Comment

by:majinharish
ID: 24144821
Could anyone say what is wrong in what i am doing
0
 
LVL 19

Expert Comment

by:alb66
ID: 24145305
Search for cac.h in your file system and add the folder to the project as I shown you in my previous comment
0
 

Author Comment

by:majinharish
ID: 24147240
1>cac.cpp(90) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(93) : error C2065: 'yyvalptr' : undeclared identifier
1>cac.cpp(93) : error C2065: 'yyattributestackptr' : undeclared identifier
1>cac.cpp(96) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(102) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(104) : error C2065: 'yylvalptr' : undeclared identifier
1>cac.cpp(107) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(112) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(118) : error C2653: 'YYPARSERNAME' : is not a class or namespace name

These are some of the errors I am getting
Could you please check the following lex code with a Parser generator
Actually I use This   http://www.bumblebeesoftware.com/downloads.htm 

Actually I have to use yacc parser.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question