This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

....

Hi

i am using following tools Version...

IDE-Version µVision3 V3.55a
RealView MDK-ARM Version: 3.15b
C Compiler: Armcc.Exe V3.1.0.914
Assembler: Armasm.Exe V3.1.0.914
Linker/Locator: ArmLink.Exe V3.1.0.914
Librarian: ArmAr.Exe V3.1.0.914

when i am compiling in C mode All file with extension c every thing is
fine,Now i am switching to cpp compiler every file other than startup
is now *.cpp .I am stuck with a warning for all inline functions

warning: #962-D: use of a type with no linkage to declare a function
and an error

L6218E: Undefined symbol ReportException (referred from port_startup.o).

i am using

IMPORT ReportException

LDR R2, =ReportException
BX R2

ReportException is defined in another cpp file..

Plz tell me is there any difference in syntax while calling function
from cpp file rather than c file.Well i didn't find any difference yet.

Regards

Parents
  • It doesn't matter if you call from a C file or from an assembler file.

    You can't IMPORT a function with one name, if the C++ file exports the function with another name.

    Your assembler code must either use the mangled name, or you must modify your C++ code so that the function is built without the decoration.

    That is where the extern "C" comes in in your c++ file.

Reply
  • It doesn't matter if you call from a C file or from an assembler file.

    You can't IMPORT a function with one name, if the C++ file exports the function with another name.

    Your assembler code must either use the mangled name, or you must modify your C++ code so that the function is built without the decoration.

    That is where the extern "C" comes in in your c++ file.

Children