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 2275

Summary: C:\SDL\SDL2-2.0.1\i686-w64-mingw32\lib/libSDL2main.a(SDL_windows_main.o): In function `console_main': /Users/slouken/release/SDL/SDL2-2.0.1-source/foo-x86/../src/main/windows/SDL_windows_main.c:140: undefined reference to `SDL_main'
Product: SDL Reporter: Larry McCaig <l2mat9c879>
Component: fileAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: blocker    
Priority: P2 CC: icculus
Version: 2.0.1   
Hardware: x86_64   
OS: Windows 7   

Description Larry McCaig 2013-11-28 00:29:37 UTC
Looks like someone's user directory got hard coded into libSDL2main.a the user name Slouken is showing up. this is in the SDL2-devel-2.0.1-mingw.tar.gz file.

Here's a copy of my entire log from Code Blocks using minGW:


-------------- Clean: Debug in SDL-FromEmptyProject (compiler: GNU GCC Compiler)---------------

Cleaned "SDL-FromEmptyProject - Debug"

-------------- Build: Debug in SDL-FromEmptyProject (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall  -g    -IC:\SDL\SDL2-2.0.1\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\Glew\glew-1.10.0\include\GL  -c K:\Development\N-S\SDL-CodeBlocks\SDL-FromEmptyProject\Celanup.cpp -o obj\Debug\Celanup.o
mingw32-g++.exe -Wall  -g    -IC:\SDL\SDL2-2.0.1\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\Glew\glew-1.10.0\include\GL  -c K:\Development\N-S\SDL-CodeBlocks\SDL-FromEmptyProject\Game.cpp -o obj\Debug\Game.o
mingw32-g++.exe -Wall  -g    -IC:\SDL\SDL2-2.0.1\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\Glew\glew-1.10.0\include\GL  -c K:\Development\N-S\SDL-CodeBlocks\SDL-FromEmptyProject\LoadContent.cpp -o obj\Debug\LoadContent.o
mingw32-g++.exe -Wall  -g    -IC:\SDL\SDL2-2.0.1\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\Glew\glew-1.10.0\include\GL  -c K:\Development\N-S\SDL-CodeBlocks\SDL-FromEmptyProject\OnEvent.cpp -o obj\Debug\OnEvent.o
mingw32-g++.exe -Wall  -g    -IC:\SDL\SDL2-2.0.1\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\Glew\glew-1.10.0\include\GL  -c K:\Development\N-S\SDL-CodeBlocks\SDL-FromEmptyProject\OnInit.cpp -o obj\Debug\OnInit.o
mingw32-g++.exe -Wall  -g    -IC:\SDL\SDL2-2.0.1\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\Glew\glew-1.10.0\include\GL  -c K:\Development\N-S\SDL-CodeBlocks\SDL-FromEmptyProject\OnLoop.cpp -o obj\Debug\OnLoop.o
mingw32-g++.exe -Wall  -g    -IC:\SDL\SDL2-2.0.1\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2 -IC:\Glew\glew-1.10.0\include\GL  -c K:\Development\N-S\SDL-CodeBlocks\SDL-FromEmptyProject\OnRender.cpp -o obj\Debug\OnRender.o
mingw32-g++.exe -LC:\SDL\SDL2-2.0.1\i686-w64-mingw32\lib -LC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\lib -LC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\lib -LC:\Glew\glew-1.10.0\lib -LC:\SDL\SDL2-2.0.1\i686-w64-mingw32\bin -LC:\SDL\SDL2_image-2.0.0\i686-w64-mingw32\bin -LC:\SDL\SDL2_mixer-2.0.0\i686-w64-mingw32\bin  -o bin\Debug\SDL-FromEmptyProject.exe obj\Debug\Celanup.o obj\Debug\Game.o obj\Debug\LoadContent.o obj\Debug\OnEvent.o obj\Debug\OnInit.o obj\Debug\OnLoop.o obj\Debug\OnRender.o   -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -lopengl32 -lglu32 -lglew32 -lglew32mx  
C:\SDL\SDL2-2.0.1\i686-w64-mingw32\lib/libSDL2main.a(SDL_windows_main.o): In function `console_main':
/Users/slouken/release/SDL/SDL2-2.0.1-source/foo-x86/../src/main/windows/SDL_windows_main.c:140: undefined reference to `SDL_main'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 4 seconds)
1 errors, 0 warnings (0 minutes, 4 seconds)
Comment 1 Ryan C. Gordon 2015-02-18 20:55:26 UTC
This is the path on the machine that built that library; I think this is okay.

--ryan.