Re: DSP/BIOS with C++ linking problem. (Answer)

Started by Douglas Pederick May 9, 2006
It turned out that the C++ name mangling was the cause.
It is easily overcome by adding a declaration at the top of the source file
that contains the functions that are referenced in the DSP/BIOS
extern "C" {
void myfunc();
void myfunct1();
This is described in the DSP/BIOS User Guide.
We also found it necessary to have the Parser code generation switch for C++
enabled for the project as well as for the particular source file. This is
found in a tab of the Build Options dialog.

----- Original Message -----
From: "William C Bonner"
To: "plughead777"
Sent: Tuesday, May 09, 2006 10:56 PM
Subject: Re: [c6x] DSP/BIOS with C++ linking problem.
> Do things work Ok, if you use a C++ file extension instead of using the
> standard C file extension? I use CPP as my file extension, since I've
> spent lots of time working with MS C. I can't remember the default file
> extension that TI C uses, and I'm not using the BIOS, but I am using the
> CSL (Chip Support Library) and all of my projects are C++ stuff.
> plughead777 wrote:
>> Hi,
>> Ive just discovered that when I enable C++ (Treat C files as C++ Files
>> (-fg)) copiler option to enable C++ code, the linker is unable to resolve
>> symbols in main.c with their references in the DSP/BIOS *.cdb
>> In other words when I enable -fg then the linker complains.
>> Is anyone else combining C++ with DSP/BIOS?