Community
cancel
Showing results for 
Search instead for 
Did you mean: 
newport_j
Beginner
33 Views

icc warning

I am just atrting out using the Intel compiler on my c code. I use the command when I compile the c code:

gcc -lm [further options} c source code.

It give me the warning


icc: warning #10315: specifying -lm before files may supercede the Intel math libraray and affect performance.


What does this mean. Should this be a concern?

Newport_j
0 Kudos
1 Reply
Brandon_H_Intel
Employee
33 Views

Yes, this could potentially be impactful to performance.

Normally, you shouldn't need to specify -lm at all to the compiler. It will link it in automatically. If you do have to do it explicitly, you should always link in system libraries last in order. In your example above, I believe:

icc {further options} {c source}

should work. And if it doesn't, try:

icc {further options} {c source} -lm