-
KeenonthedaywalkerLikes 0Problem Description
I get this error: C:\Users\Keenon\Desktop\SDLMinGW>g++ main.cpp -IC:\Users\Keenon\Desktop\Coding\SDL2_MinGW_X64\i686-w64-mingw32\include -LC:\Users\Keenon\Desktop\Coding\SDL2_MinGW_X64\i686-w64-mingw32\lib -w -Wl,-subsystem,windows -lmingw32 -lSDL2main -lSDL2 -o SDLMain
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\Keenon\Desktop\Coding\SDL2_MinGW_X64\i686-w64-mingw32\lib/libSDL2main.a(SDL_windows_main.o): in function `main_getcmdline':
/Users/valve/release/SDL/SDL2-2.0.9-source/foo-x86/../src/main/windows/SDL_windows_main.c:175: undefined reference to `SDL_main'
collect2.exe: error: ld returned 1 exit statusHow do I fix it?
-
Sonar Systems adminLikes 0
When does this occur?
-
KeenonthedaywalkerLikes 0
Once I’ve typed out this:
g++ main.cpp -IC:\Users\Keenon\Desktop\Coding\SDL2_MinGW_X64\i686-w64-mingw32\include -LC:\Users\Keenon\Desktop\Coding\SDL2_MinGW_X64\i686-w64-mingw32\lib -w -Wl,-subsystem,windows -lmingw32 -lSDL2main -lSDL2 -o SDLMain
And then I just pressed enter and it gave me the error.
-
Sonar Systems adminLikes 0
Try the steps again
-
KeenonthedaywalkerLikes 0
Ok, I will try that.
-
Sonar Systems adminLikes 0
Great
-
KeenonthedaywalkerLikes 0
No Luck :(
-
Sonar Systems adminLikes 0
Same error?
-
KeenonthedaywalkerLikes 0
Yeah, same error. Any idea what it could be?
-
Sonar Systems adminLikes 0
What version are you using?
-
KeenonthedaywalkerLikes 0
I’m using version 2.0.9
-
Sonar Systems adminLikes 0
Try a slightly older version.
-
KeenonthedaywalkerLikes 0
Ok, I’ll try that.
-
Sonar Systems adminLikes 0
Let me know how it goes.
-
KeenonthedaywalkerLikes 0
Ok, I got one step closer to success, but now I have another error!
Here’s the new error: main.cpp:3:10: fatal error: SDL2/SDL.h: No such file or directory
#include <SDL2/SDL.h>
^~~~~~~~~~~~
compilation terminated.This leads me to believe that, somehow the directories aren’t reaching eachother or something along those lines.
-
Sonar Systems adminLikes 0
Which version are you trying now?
-
KeenonthedaywalkerLikes 0
I’m now using version 2.0.9
-
Sonar Systems adminLikes 0
That’s the same version
-
KeenonthedaywalkerLikes 0
Yeah sorry, I should be more specific. I downloaded version 2.0.9 but the Mingw one, which I did not previously have and I think that mightve solved my first problem.
-
Sonar Systems adminLikes 0
It’s working now?
-
KeenonthedaywalkerLikes 0
No, unfortunatly not. I’m slowly losing my mind.
-
Sonar Systems adminLikes 0
Try another method outside of mingw
-
KeenonthedaywalkerLikes 0
I’ll try that. Anyways thanks for your help and patience this past week, appreciate it a lot. Goodbye and thanks again.
-
Sonar Systems adminLikes 0
Good luck
-
KeenonthedaywalkerLikes 0
Thanks.
-
Sonar Systems adminLikes 0
:D
-
KeenonthedaywalkerLikes 0
:D
Login to reply