heechan.yang

[Programming Language] extern "C" 본문

Computer Science

[Programming Language] extern "C"

heechan.yang 2023. 10. 11. 17:06

extern "C" enables a C source code to call a funciton from C++ source code. With the capability of overloaded function in C++, name mangling was the solution. Name mangling adds a certain string of information onto the name of the original function. Therefore, with extern "C", name mangling is not performed, allowing C language source code to call functions from C++ source code.


References

[1] https://noel-embedded.tistory.com/1078