Answer the question
In order to leave comments, you need to log in
Combining a C-link and a C++ application when building for ARM - why is ARM not friendly with extern c?
Hello. I have a C++ application that uses 1 ss lib, with many ssh functions. They are of course described in the headings. using Extern "C" (if there is __cplusplus) The application itself is working with a lot of data, there is nothing special and confused in it. Let's compile the whole thing under x86 using g++. Everything works as it should. But this application must be uploaded to the iWave microcontroller, so an assembly for ARM is required. The compiler used is arm-linux-gnueabihf-g++. It seems that all the packages for ubuntu were downloaded and updated, for assembly using this compiler. The lib itself is enabled, there are no warnings, but errors occur in all extern functions used. Those. it is written:
/home/user/workspace/project/arm/lib.a(manager.o): In function `Agent_From': manager.c:(.text+0x69e): undefined reference to `Agent_Get' manager.c:(.text +0x6c4): undefined reference to `Agent_Get' manager.c:(.text+0x6ea): undefined reference to `Agent_Get' manager.c:(.text+0x710): undefined reference to `Agent_Get' manager.c:(. text+0x750): undefined reference to `Agent_Get'
How to be and where to dig? Maybe someone faced a similar problem? I saw on the Internet that some people solved this problem with the help of "-fpermissive", however, this problem could not be solved in this way. I can provide some additional information tomorrow. There are no problems with the assembly for Windows, and it works like a clock, with an arm bug with a link. ps the linker is given a lib created for arm of course,
Answer the question
In order to leave comments, you need to log in
Digging is in the direction of the documentation for the compiler. If sclerosis does not change me, Extern "C" is not supported in it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question