Welcome! Log In Create A New Profile

Advanced

SDL link error

Posted by g_man 
SDL link error
June 07, 2009 06:21PM
I'm compiling a program using SDL for windows, and I'm getting a linker error, and I can't figure out why.
I know SDL is installed correctly because I have run other programs with it, and I have checked and the DLL's are all the same, I'm using Dev-C++ for my IDE and i have checked my .Dev files and they are exactly the same. The only difference is the names of .cpp files, and the name of the final .exe. I don't know what the problem is. please help.

here is the link error:
 D:\MinGW\lib\libSDLmain.a(SDL_win32_main.o)(.text+0x417) In function `console_main': 
         [Linker error] undefined reference to `SDL_main' 
 D:\MinGW\lib\libSDLmain.a(SDL_win32_main.o)(.text+0x417) ld returned 1 exit status
Thanks
Re: SDL link error
June 07, 2009 08:41PM
Firstly, you should be outputting an .elf and .dol file, not an .exe since you're programming for Wii. Secondly, check to make sure that you have all of your libs included properly in your makefile.
Ignore. See below comment.



Edited 1 time(s). Last edit at 06/08/2009 06:11PM by Arikado.
Re: SDL link error
June 08, 2009 08:15AM
Didn't he say, he is compiling for windows?
Re: SDL link error
June 08, 2009 08:47AM
Here's the answer to your problem. [tinyurl.com]

Click first result.

int main(int argc, char *argv[])
Re: SDL link error
June 08, 2009 06:10PM
Quote
daniel_c_w
Didn't he say, he is compiling for windows?
Erm, he did. So just ignore my previous comment everyone. Unfortunately, I made the mistake of assuming that everything posted in the coding section is for making Wii Programs (like it should be). With that in mind... Topic moved.
Re: SDL link error
June 08, 2009 08:08PM
Quote
Arikado
Quote
daniel_c_w
Didn't he say, he is compiling for windows?
Erm, he did. So just ignore my previous comment everyone. Unfortunately, I made the mistake of assuming that everything posted in the coding section is for making Wii Programs (like it should be). With that in mind... Topic moved.
Since he's using SDL, he's most likely just trying to get some base code running on a pc first before throwing it on a wii(or even developing the whole game on a pc, and then porting it to wii). It really speeds up development. I'm making two Wii SDL games the same way.
Sorry, only registered users may post in this forum.

Click here to login