C and C++ Run-Time Library Guide
Calling Library Functions
To use a C/C++ library function, call the function by name and give the
appropriate arguments. The name and arguments for each function appear
on the function's reference page. The reference pages appear in the
umented Library Functions" on page 3-23
Library topic of the on-line Help.
Like other functions you use, library functions should be declared. Decla-
rations are supplied in header files. For more information about the
header files see
Function names are C/C++ function names. If you call a C or C++
run-time library function from an assembler program, you must use the
assembly version of the function name.
• For C functions, this is an underscore at the beginning of the C
function name. For example, the C function
as
_main
• Functions in C++ modules are normally compiled with an encoded
function name. Function names in C++ contain abbreviations for
the parameters to the function and also the return type. As such,
they can become very large. The compiler "mangles" these names
to a shorter form. You can instruct the C++ compiler to use the sin-
gle-underscore convention from C, as shown by the following
example.
extern "C" {
int myfunc(int);
}
Alternatively, compile C++ files to assembler, and see how the function
has been declared in the assembly file.
3-4
"Working With Library Header Files" on page
from assembler.
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
and in the C++ Run-Time
main()
// external name is _myfunc
for ADSP-219x DSPs
"Doc-
3-8.
is referred to
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers