Re-flex library not found in C++ autotools project

35 Views Asked by At

I am working on a compiler project so I am using Re-flex for the lexer and Bison for the parser.

The build project is based on autotools and everything is fine except one thing :

fatal error: 'reflex/matcher.h' file not found
#include <reflex/matcher.h>

It seems that reflex can't be found. I am on Mac M1 and I have installed re-flex with Homebrew. I tried a lot of things to solve this problem like export the path of the library with :

export CPATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib

Or

export CPPFLAGS="-I/opt/homebrew/opt/re-flex/include"
export LDFLAGS="-L/opt/homebrew/opt/re-flex/lib"

But nothing works. Is there any way to include the path to the library to make my project build correctly ?

0

There are 0 best solutions below