| Summary: | dll exports broken in current hg | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ozkan Sezer <sezeroz> |
| Component: | build | Assignee: | Ozkan Sezer <sezeroz> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | Keywords: | target-2.0.14 |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| Attachments: | DLL_EXPORT patch | ||
|
Description
Ozkan Sezer
2020-12-08 20:18:45 UTC
Let's go ahead and switch the projects to define DLL_EXPORT. Thanks for catching that! Created attachment 4556 [details]
DLL_EXPORT patch
Here is an initial patch, which does the following. Please review.
begin_code.h (DECLSPEC): Remove BORLANDC support. Change __declspec(dllexport)
condition from _DLL to DLL_EXPORT.
- Question: Should we add __CYGWIN__ there along with __WINDOWS__ and __WINRT__?
CMakeLists.txt (SDL2 SHARED): Add DLL_EXPORT define.
VisualC/SDL/SDL.vcxproj (ClCompile -> PreprocessorDefinitions): add DLL_EXPORT
TODO: VisualC-WinRT projects: There are three projects there. Should I do the
same with VisualC? (All those three build DLLs, right?)
Build-tested with:
- autotools (configure), targeting x86_64-w64-mingw32
- cmake, targeting x86_64-w64-mingw32
- VS2017, x86/x64 Release and Debug configurations
Yes, the WinRT projects should define this as well. No, I don't think we should check __CYGWIN__, I think that's used for the UNIX emulation layer. (In reply to Sam Lantinga from comment #3) > Yes, the WinRT projects should define this as well. No, I don't think we > should check __CYGWIN__, I think that's used for the UNIX emulation layer. Actually, yes, we should check __CYGWIN__, since it uses the Win32 DLL toolchain. I think this is the last thing we're waiting on for the SDL 2.0.14 release candidate build, so go ahead and commit when you're ready and let me know when you're done. Thanks! (In reply to Sam Lantinga from comment #5) > I think this is the last thing we're waiting on for the SDL 2.0.14 release > candidate build, so go ahead and commit when you're ready and let me know > when you're done. > > Thanks! Pushed https://hg.libsdl.org/SDL/rev/849e9a72cfff (In reply to Sam Lantinga from comment #5) > I think this is the last thing we're waiting on for the SDL 2.0.14 release > candidate build, Make sure to check bug #5253 before doing 2.0.14 Closing this one. |