Thread: RE: [Dev-C++] Need help with linker error from SDL + OpenGL
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Damien A <g_...@ho...> - 2003-12-15 00:30:05
|
<html><div style='background-color:'><DIV class=RTE> <P>When compiling SDL programs on Dev-C++, make sure your linker arguments start as follows:</P> <P>-lmingw32 -lsdlmain -lsdl </P> <P>Any additional libraries can follow those.<BR></P></DIV> <DIV></DIV>>From: Jack Chen <JAC...@YA...> <DIV></DIV>>To: dev...@li... <DIV></DIV>>Subject: [Dev-C++] Need help with linker error from SDL + OpenGL <DIV></DIV>>Date: Sun, 14 Dec 2003 19:22:08 -0500 (EST) <DIV></DIV>>MIME-Version: 1.0 <DIV></DIV><mailto:dev...@li...?subject=unsubscribe><mailto:dev...@li...><mailto:dev...@li...?subject=help><mailto:dev...@li...?subject=subscribe> <DIV></DIV>> <DIV></DIV>>Hi, does anyone here know how to fix this problem? <DIV></DIV>> <DIV></DIV>>I installed SDL for Dev-C++ and ran the sample program no problem, but <DIV></DIV>>when I used OpenGL in SDL there's a linker error: <DIV></DIV>> <DIV></DIV>>[Linker error] undefined reference to `SDL_main' <DIV></DIV>> <DIV></DIV>>no other errors. Does anyone know how to fix this problem? <DIV></DIV>> <DIV></DIV>>Thanks in advance for any help. <DIV></DIV>> <DIV></DIV>>JackC <DIV></DIV>> <DIV></DIV>>______________________________________________________________________ <DIV></DIV>>Post your free ad now! http://personals.yahoo.ca <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>------------------------------------------------------- <DIV></DIV>>This SF.net email is sponsored by: IBM Linux Tutorials. <DIV></DIV>>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's <DIV></DIV>>Free Linux Tutorials. Learn everything from the bash shell to sys admin. <DIV></DIV>>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click <DIV></DIV>>_______________________________________________ <DIV></DIV>>Dev-cpp-users mailing list <DIV></DIV>>Dev...@li... <DIV></DIV>>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></mailto:dev...@li...?subject=subscribe></mailto:dev...@li...?subject=help></mailto:dev...@li...></mailto:dev...@li...?subject=unsubscribe></div><br clear=all><hr>Add photos to your messages with <a href="http://g.msn.com/8HMBEN/2749??PS=">MSN 8. </a> Get 2 months FREE*.</html> |
From: Jack C. <jac...@ya...> - 2003-12-15 00:37:07
|
Yeah I had that. It was the default settings that came with the SDL project, but I still got that problem: [Linker error] undefined reference to `SDL_main' Jack >Damien A wrote: >When compiling SDL programs on Dev-C++, make sure your linker arguments >start as follows: > >-lmingw32 -lsdlmain -lsdl > >Any additional libraries can follow those. ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca |
From: Damien A <g_...@ho...> - 2003-12-15 01:18:52
|
<html><div style='background-color:'><DIV class=RTE> <P><BR>Does you SDL_main match the prototype? Meaning, does your main function have arguments? If not, make sure it does.</P> <P><BR> </P></DIV> <DIV></DIV>>From: Jack Chen <JAC...@YA...> <DIV></DIV>>To: dev...@li... <DIV></DIV>>Subject: RE: [Dev-C++] Need help with linker error from SDL + OpenGL <DIV></DIV>>Date: Sun, 14 Dec 2003 19:37:06 -0500 (EST) <DIV></DIV>>MIME-Version: 1.0 <DIV></DIV><mailto:dev...@li...?subject=unsubscribe><mailto:dev...@li...><mailto:dev...@li...?subject=help><mailto:dev...@li...?subject=subscribe> <DIV></DIV>>Yeah I had that. It was the default settings that came with the SDL <DIV></DIV>>project, but I still got that problem: <DIV></DIV>> <DIV></DIV>>[Linker error] undefined reference to `SDL_main' <DIV></DIV>> <DIV></DIV>>Jack <DIV></DIV>> <DIV></DIV>> >Damien A wrote: <DIV></DIV>> <DIV></DIV>> >When compiling SDL programs on Dev-C++, make sure your linker <DIV></DIV>>arguments >start as follows: <DIV></DIV>> > <DIV></DIV>> >-lmingw32 -lsdlmain -lsdl <DIV></DIV>> > <DIV></DIV>> >Any additional libraries can follow those. <DIV></DIV>> <DIV></DIV>>______________________________________________________________________ <DIV></DIV>>Post your free ad now! http://personals.yahoo.ca <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>------------------------------------------------------- <DIV></DIV>>This SF.net email is sponsored by: IBM Linux Tutorials. <DIV></DIV>>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's <DIV></DIV>>Free Linux Tutorials. Learn everything from the bash shell to sys admin. <DIV></DIV>>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click <DIV></DIV>>_______________________________________________ <DIV></DIV>>Dev-cpp-users mailing list <DIV></DIV>>Dev...@li... <DIV></DIV>>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></mailto:dev...@li...?subject=subscribe></mailto:dev...@li...?subject=help></mailto:dev...@li...></mailto:dev...@li...?subject=unsubscribe></div><br clear=all><hr>STOP MORE SPAM with <a href="http://g.msn.com/8HMBEN/2728??PS=">the new MSN 8</a> and get 2 months FREE*</html> |
From: Jack C. <jac...@ya...> - 2003-12-15 01:58:56
|
Thank you, THANK YOU, Sir. Problem solved! How did you know it's the arguments in Main() that's causing all the trouble? Man I've been searching on the net for 4 hours, on GCC, Cygwin, MingW, SDL, and whole bunch of tutorials just to get my simple OpenGL triangle to compile. You saved my life, Damien. Thank you, thank you. Jack (by the way, how can I simply reply to a message to Dev-C++'s mailing list like you did, without copying everything manually? And, are you gonna stay on this list for long? It's hard to find real treasure like you.) >Damien A wrote: > >Does you SDL_main match the prototype? Meaning, does your main function >have arguments? If not, make sure it does. ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca |
From:
<ri...@te...> - 2003-12-18 03:25:25
|
Jack Chen escribió: >Thank you, THANK YOU, Sir. Problem solved! > >How did you know it's the arguments in Main() that's causing all the >trouble? Man I've been searching on the net for 4 hours, on GCC, >Cygwin, MingW, SDL, and whole bunch of tutorials just to get my simple >OpenGL triangle to compile. > > Humm are you sure you really searched that long? http://www.libsdl.org/faq.php?action=listentries&category=4#48 When everything fails, use the FAQs ;) Regards -- --------------------------------------------------- Ricardo Amores Hernández ICQ: 19463735 MSN: zheo_ (at) hotmail (dot) es --------------------------------------------------- |