0
votes

We are migrating code to the Clang-based 64-bit compiler in C++Builder 10.2.3.

The linker is complaining about an unresolved external for pow10(), which is in math.h, but apparently we need a lib that isn't being linked.

Does anyone know which one it is?

1
-lm, usually. - user707650

1 Answers

0
votes

AFAICT, it is not linked in. I dumped cw64.a and it does not contain that function.

There is an alternative:

double d = pow10l(2);

That will compile and link fine, and give the correct result, 100.0. The result is supposed to be a long double, but that maps to double in Win64, so that works fine.


FWIW, there is also a function _pow10(), but that is for internal use only. It seems to be a helper function for pow10l() and some other functions.