I'm trying to compile code and in order to get it to work I need to run the following line before compilation:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
After this the code compiles normally, I'm trying to add this so that I do not need to run this line each time when I restart my PC. I've tried adding that line to the .bashrc
file (does the file path needs quotes?) which has not seemed to work. I have also tried creating a .bash_profile
file an adding the line in there but again this does not seem to work.
Whenever I try to compile after adding the .bash_profile
I am getting the following error:
./makeScript: line 1: pkg-config: command not found
makeScript
?g++ -std=c++11 $1 -o $2 `pkg-config --cflags --libs opencv`
I have tried removing the hyphen is that line as well to no effect.