| Summary: | Issues building static library on Windows with CMake (missing stdlib functions) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Philip Bennefall <philip> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | 2.0.12 | ||
| Hardware: | x86 | ||
| OS: | Windows 10 | ||
|
Description
Philip Bennefall
2020-12-08 09:44:13 UTC
Fixed, thanks! https://hg.libsdl.org/SDL/rev/0aa5690fb1c8 Also thank you for the heads up on the other patches in that folder. I accepted most of them for the next SDL release. This one https://hg.libsdl.org/SDL/rev/be0a46c9b010 is wrong and also problematic. The _DLL macro usually is defined by MSVC dll projects, but it is not defined by our MSVC project files because it has not been needed. The autotools builds define DLL_EXPORT by way of libtool, but begin_code.h doesn't check it. The result is: the autotools builds now export all and every symbol it can find. Solution would be defining DLL_EXPORT in CMake and MSVC project files and changing _DLL to DLL_EXPORT in begin_code.h. (It may also be good to add an extra BUILD_SDL macro to the table like the OS/2 version..) Also, the satellite projects such as SDL_mixer should be tested with the changes. (In reply to Sam Lantinga from comment #1) > Fixed, thanks! > https://hg.libsdl.org/SDL/rev/0aa5690fb1c8 > > Also thank you for the heads up on the other patches in that folder. I > accepted most of them for the next SDL release. Thank you for the quick turnaround! The string function issue was a blocker for me. Much appreciated! (In reply to Ozkan Sezer from comment #2) > This one https://hg.libsdl.org/SDL/rev/be0a46c9b010 is wrong and also > problematic. > > The _DLL macro usually is defined by MSVC dll projects, but it is not > defined by our MSVC project files because it has not been needed. The > autotools builds define DLL_EXPORT by way of libtool, but begin_code.h > doesn't check it. The result is: the autotools builds now export all > and every symbol it can find. > > Solution would be defining DLL_EXPORT in CMake and MSVC project files > and changing _DLL to DLL_EXPORT in begin_code.h. (It may also be good > to add an extra BUILD_SDL macro to the table like the OS/2 version..) > Also, the satellite projects such as SDL_mixer should be tested with > the changes. Closing again. Opened a new bug #5384 for this dll exports issue. |