Thank you very much oBFusCATed
I previously already read this wiki page but didn't success at the first try because :
I am using Flex and Bison, downloaded from GNU for windows.
- That give me C file (lex.yy.c, parser.tab.c and parser.tab.h)
Compiling CPP code project
- My project is a *.cpp file.
The problem was :
- I create CPP C::B Project
- Remove Main.cpp
- Add lexer.l, parser.y and files.cpp to my C::B Project
- Compile.
During the compilation happen 2 problems :
1) Which file C::B has to compile first, second, etc... (normaly is 1.Flex, 2.Bison, 3.g++)
2) Which compiler use ? (gcc, g++, flex, bison)
Answer 1 : C::B doesn't know which file has to be compiled first.
Answer 2 : C::B compile my parser.tab.c and my lex.yy.c w/ gcc instead of g++ (or didn't want to compile C file w/ g++) and my CPP file project w/ g++
To solve the problem
1) Right click on both flex/bison files -> properties... -> Build -> check compile file and change the priority weight
2) use flex and bison -o option to make ".cpp" output files and follow the wiki page
http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system to create auto_generation files
Work well after all