We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4008

Summary: SDL_main() gets exported while executables dont have exports
Product: SDL Reporter: amir ramezani <amir.ramezani1370>
Component: mainAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   

Description amir ramezani 2017-12-22 16:02:35 UTC
hi,
in visual studio 2015 when i import the libraries (the libraries which are available on the sdl's website), when i import sdl2main.lib, SDL_main() gets exported which shouldn't (my game is an executable, not a dll).
as a result, a .lib and .exp file is made beside the executable.
i think SDL_Main() is declared as DLLEXPORT
although i declare my SDL_main as follows:
int SDL_main(int argc, char** argv)
but, it is exported
note that i've tested this on vs2015 with windows 10 64 bit (the application is compiled for 32 bit with SSE support)
thanks
Comment 1 Sam Lantinga 2017-12-22 18:01:48 UTC
This is fixed in the latest snapshot:
http://www.libsdl.org/tmp/SDL-2.0.zip