From: YuGiOhJCJ <yug...@fr...> - 2006-06-22 20:22:57
|
Keith MARSHALL a =E9crit : > YuGiOhJCJ wrote: > =20 >> I have do what you said to me: >> =20 > > <sigh> No, you have not! > > Sure, you have fixed the source error, as Michael suggested: > > =20 >> The source: >> >> #include <SDL.h> >> >> int main (int argc, char* argv[]){ >> =20 > : > : > > But you have completely ignored what I said about the order of command > line arguments, ... > > =20 >>>> D:\Programmes\Affichage_Image>C:\MinGW\bin\gcc.exe >>>> -lSDL -lSDLmain test.c >>>> =20 >>> In addition to the coding error, noted by Michael, this command line >>> is suspect. Order of command line arguments is important! Libraries >>> *must* be specified *after* the modules referring to them. In the >>> above, `-lSDL' and `-lSDLmain' are placed before the only possible >>> referrer, `test.c', so they will never be searched. >>> >>> You need: >>> D:\Programmes\Affichage_Image>C:\MinGW\bin\gcc.exe test.c >>> -lSDL -lSDLmain >>> >>> or maybe: >>> D:\Programmes\Affichage_Image>C:\MinGW\bin\gcc.exe test.c >>> -lSDLmain -lSDL >>> =20 > > ... which is precisely why you now see: > > =20 >> The compilation: >> >> Microsoft Windows XP [version 5.1.2600] >> (C) Copyright 1985-2001 Microsoft Corp. >> >> D:\Programmes\Affichage_Image>C:\MinGW\bin\gcc.exe >> -lSDL -lSDLmain test.c >> C:\DOCUME~1\YUGIOH~1\LOCALS~1\Temp/ccA3baaa.o(.text+0xe):test.c:=20 >> undefined reference to `SDL_Init' >> =20 > : > : > > ... and many more `unresolved reference' errors. > > Please read my earlier message again, and fix the order of your > command line arguments. > > Regards, > Keith. > > Using Tomcat but need to do more? Need to support web services, securit= y? > Get stuff done quickly with pre-integrated technology to make your job = easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron= imo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > > > > =20 No, I think I have read it, I've tried a lot of command line arguments,=20 in different orders but always I have an error. |