LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Using YACC with C++ in Kdevelop (https://www.linuxquestions.org/questions/programming-9/using-yacc-with-c-in-kdevelop-398208/)

dancarlson 12-31-2005 03:17 PM

Using YACC with C++ in Kdevelop
 
Anyone have any thoughts on using YACC with C++ (that is I am using C++ objects in the YACC code snippets) with the KDevelop environment? KDevelop recognizes the YACC .y file but wants to compile the output as C code. Not sure how to convince it to compile as C++. I am porting some code from Windows that was written this way so I would like to minimize changes if possible. Thanks!

dancarlson 01-07-2006 12:29 PM

The way to do this is to rename the yacc.y file to yacc.yy and the lex.l file to lex.ll. This will cause bison and flex to generate .cc files which will be compiled as c++.


All times are GMT -5. The time now is 09:22 PM.