3
rated 0 times
[
3]
[
0]
/ answers: 1 / hits: 1456
/ 1 Year ago, tue, april 18, 2023, 1:52:21
I have an alias defined to compile an opencv program which goes like this
alias gcv='g++ -I/usr/local/include/opencv -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_objdetect'
Then I go on to type
gcv imageshow.cpp
I get this long list of errors
But when I use the same command specified in the alias with the .cpp(source code) file in between the Include and Library files (following the suggestion here), everything works like a charm.
g++ -I/usr/local/include/opencv imageshow.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui
Now typing the long command, which gets even bigger as complexity increases, every time is getting difficult, please help me in getting the alias to work or suggest any other alternative.
More From » command-line