This topic is now archived and is closed to further replies.


dev-cpp and sdl

Recommended Posts

tomn    122
Before this sounds like a criticism, I''d like to say that the SDL tutorials on were really useful and a great eye-opener about SDL. The lessons compile and results look great. Thank you. There are just enough compiler and environment issues to frustrate a beginner who expects the .dev files simply to compile. There are issues about which OS (Linux or Win32 or?), which compiler (Virtual C or Dev/Cpp or?) etc. that the author is coming from. It might be really helpful to learners to share some tips or a faq. Here are a few I''ve figured out but probably not all. I''m referring, of course, to compiling in a win32 environment using Dev-C++ and SDL and the tutorials mentioned above: *Put a copy of Mainicon.ico in c:\dev-cpp\bin *Create new console project in Dev-C++ *Add source files to new project manually *As to main.cpp: 1st, remove main.cpp from project that new project creates; 2nd, make a copy of lessonX.cpp named main.cpp; 3rd, add the (re-named) main.cpp back to project. *Be sure the path to SDL headers is correct. Mine is #include <SDL/SDL.h> Lesson 1, I think, compiles just fine. Lesson 2 in file rsrc.rc, change path reference from c++ to cpp Mine looks like this: 500 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "C:/Dev-Cpp/Bin/Mainicon.ico" Lesson 3 the main thing here is that file CSpriteBase.cpp needs to have added near the top #include <string.h> I got errors about undeclared function strlen() These things may seem obvious to someone tuned in to the ways of compilers and linkers, but to others, they can be just frustrating enough that the person will just move on and forget it. Now on to Lesson 4. Hope this helps someone. Tom

Share this post

Link to post
Share on other sites