1 year ago
#376194
user15158413
What is the equivalent of -llib of gcc in g++?
I am compiling a cpp program with math.h using Arm performance library
In their example they compile programs in this way:
gcc code_with_math_routines.c -lamath -lm
But when I try g++ as follow:
g++ code_with_math_routines.cpp -lamath -lm
This will give an undefined reference error and the math function are not recognized.
collect2: error: ld returned 1 exit status
What is the difference between gcc and g++ command?
gcc
g++
0 Answers
Your Answer