Can C# for Linux [Centos8] call other languages

Frank Natoli 71 Reputation points
2021-04-10T02:29:54.46+00:00

I understand C# is available for Linux specifically Centos8:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos
But can an application developed in C# for Linux/Centos8 call into libraries compiled for other languages, e.g., C++ or C?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,415 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,308 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sam of Simple Samples 5,516 Reputation points
    2021-04-10T18:17:28.747+00:00

    It depends on the definition of call. Originally computer programs were only capable of static linking where multiple source files were compiled (by a compiler) then combined into a single executable file by a linker. That was how programming was originally done in Unix. About 40 years ago (before Windows) compilers (then operating systems) began to support dynamic linking. When Windows was developed it relied heavily on dynamic linking, right from the initial design. I believe that Windows supported dynamic linking before Unix did.

    The .Net Framework does not support static linking. It is not possible to combine multiple computer languages in a single managed (.Net) executable file. It is possible to create a dynamic link library using a computer language such as C or C++ and call functions/methods in that library from a managed executable. I hope the following help.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful