G
G
Gad_h2016-03-25 16:36:33
C++ / C#
Gad_h, 2016-03-25 16:36:33

What languages ​​does the gcc compiler allow to link to C++?

What languages ​​can be linked to C++ code using other than C?
extern "language" void func();

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MiiNiPaa, 2016-03-25
@MiiNiPaa

Guaranteed you can use extern "C". The rest is implementation defined, see the documentation for the compiler.

B
beduin01, 2016-03-25
@beduin01

D. _ In particular a compiler like https://github.com/Syniurge/Calypso

D
Dvvarreyn, 2016-04-01
@Dvvarreyn

In the extern "C" construct, "C" is not a C language, but a way to pass arguments and a return address.
The same language can produce different code for calling functions.
The ability to bind is not determined by the language, but by how the called function is defined and by the compiler settings.
Without special instructions, C compilers do not always produce code for functions that conforms to the argument passing standard required for extern "C".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question