0

I want to use the function Sign() in a Borland C++ Builder 6 application. I cannot however find the correct header file.

When I use this function I get a compiler error saying undefined symbol, Sign.

You would think this function would be in math.h but I can't find it there. It shows up in the help list (Unit : Math).

I saw some threads for similar missing function definition (stddev for example). A solution was to add the option -lm or -lc to the compiler. But how to configure it in Borland C++ Builder graphical interface for compiling options ?

4

1 回答 1

1

您正在寻找 Math.hpp。当帮助显示“Unit: ...”时,它指的是 Delphi 单元。这些通过 Delphi 编译器生成的 Unit.hpp 头文件提供给 C++。math.h 是由 C 运行时提供的单独的头文件。

于 2013-04-24T20:25:31.297 回答