   Help with linker error (Devc++ and SDL)
  Im using SDL with devc++ and it works fine when my projects are in my devc++ folder. But when I tried to make a project folder on my desktop I get this error  [Linker error] undefined reference to `WinMain@16' these are the libs I have in my linker list:../../../../../Dev-Cpp/lib/libSDLmain.a../../../../../Dev-Cpp/lib/libSDL.a../../../../../Dev-Cpp/lib/libSDL_image.a../../../../../Dev-Cpp/lib/sdlgfx.lib../../../../../Dev-Cpp/lib/libmingw32.anot sure whats wrong. I'd greatly apretiate any help.   
  1st try moving the "../../../../../Dev-Cpp/lib/libmingw32.a" to the top of the list in the linker box and 'rebuild'. If that doesn't work, then those paths might not be correct for the desktop folder, so you will need to redo them to they now correspond to your DevCpp folder. Simply just add them all again though the file picker. Oh and you do have: int main(int argc, char* argv[]) correct?   ;  Have you tried:#ifdef _WIN32#undef main#endif?When i compile my projects as Windows applications I need these lines to avoid problems..   ;Quote:Original post by philipptrHave you tried:#ifdef _WIN32#undef main#endifThat worked. Thanks alot.