LukasBanana / LLGL

Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
BSD 3-Clause "New" or "Revised" License
2.05k stars 139 forks source link

Remove "lib" prefix from dll names when building with mingw #32

Closed wirx6 closed 5 years ago

wirx6 commented 5 years ago

This fixes no renderer modules available on target platform error when running examples built with mingw

LukasBanana commented 5 years ago

Thank you for your contribution.

I never considered using MinGW for this project, because D3D11 or later will be tough to compile with anything else but MSVC. How do you compile these targets anyways?

I think in this case, however, it is better to simply construct the module name just like on the Linux platform (since MinGW is coming from the POSIX world), see here.

This also ensures that MinGW compiled DLLs are not accidentally linked to an MSVC build.

If you agree, I would close this pull request and insert a small preprocessor compiler check à la

#ifdef __MINGW32__
wirx6 commented 5 years ago

For now I'm testing OpenGL and Vulkan backends using MSYS2, D3D11 and D3D12 are not built. I won't mind if you implement this fix differently.

LukasBanana commented 5 years ago

Fixed with d507920.