Solved

Compiling in visual C++ 2005 express edition

Posted on 2009-04-12
5
336 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 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
NetBeans and configurationfiles 2 52
Notepad++ Remote File Management 3 88
Intellij adding new line in xml 3 75
eclipse package explorer vs project explorer view 2 135
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. …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
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 use and create keystrokes in Netbeans IDE 8.0 for Windows.

831 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