I found this command line in a tutorial:
gcc -o Client1 Client1.o CodeSample1.dll -lgdi32 -lm
and made me wonder when is possible to call a windows DLL from a linux client, or well, a Linux .so file from a windows client. Are there any constraints such as language, name decoration, etc?
I have a suspicion that you’re not actually trying to ask what you asked.
The .dll file in your example is just a shared library. You can link against shared libraries with GCC. The only question is what you call your library:
The naming convention is really just a convention. Now to link your program:
So if the code is entirely in your hands, you just build the library first and then link against your project.
If you really mean that the library source code is unavailable and you only have a Windows binary, then the situation is a lot trickier. For instance, the binary formats aren’t even compatible.