Solved

Compiling in visual C++ 2005 express edition

Posted on 2009-04-12
5
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Accepted Solution

by:
alb66 earned 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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.

705 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