Using both .so and .dll on Windows

I am writing a program in Windows in C ++ in which users can compile extensions in the form of dynamic link libraries (windows) or shared object files (linux).

In windows, you use the function LoadLibraryto load the dll. Is it possible to do the same for .so files on windows and vice versa, load .dlls in linux?

+3
source share
3 answers

Short answer: "No"

This is not a download, but an internal dynamic library format, such as expected entry points. Each operating system supports its own format. Therefore, this will not work.

  • DLL is a PE executable (like exe for windows)
  • .so ELF ( Linux/Unix).

Linux PE- Wine, Wine DLL. , , , .

Windows ELF cygwin, , coff (, Unix ELF). DJGPP .

+3

DLL SO - , , , , DLL Linux SO Windows.

+1

AFAIK, , Windows Linux , ( ), .so Win32, .dlls Linux.

+1
source

Source: https://habr.com/ru/post/1754340/


All Articles