Jump to content
  • Advertisement
Sign in to follow this  

SDL and Borland agreement problem

This topic is 2765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

I cannot seem to get SDL installed into borland. I followed some of the other threads and I'm getting completely different errors. I copy and pasted the program from Lazyfoo.
#include "SDL/SDL.h" 
int main( int argc, char* args[] ) {
//Start
SDL SDL_Init( SDL_INIT_EVERYTHING ); //Quit SDL
SDL_Quit();
return 0;
}

borland tells me there are errors within the SDL file themselves. I know I installed it wrong, but I put the include files into the include folder of borland in a sub directory called SDL. Everything else I put into the lib folder under a sub folder called SDL. Any help?
Thanks,
Nathan

Share this post


Link to post
Share on other sites
Advertisement
It's possible that SDL is not compatible with Borland as-is and requires some modifications. What version of Borland are you using? Try looking at this thread to see if that solves your problem. If not, you might need to do some more Google searching for compatibility fixes.

Share this post


Link to post
Share on other sites
I am using version 5.5 I have googled for the past two days on it. That is one of the posts I found through google. I'm having a different problem. I'm not sure exactly how to modify this stuff as I'm only in foundations of programming, so we haven't covered the difference between compilers and such things. I've tried learning on my own but there just isn't a whole lot out on the net (that I've found through engines)
Thanks for the reply

Share this post


Link to post
Share on other sites
If you are new to programming and just want to get started on Windows, you should use Microsoft Visual C++ 2010 Express Edition or Microsoft Visual C++ 2008 Express Edition. In doing so, you'd be able to get working with SDL a lot faster and be able to follow the LazyFoo tutorials (see 2008 or 2010 setup instructions). Visual Studio offers a very nice IDE to get working with C++ and offers an excellent debugger as well. It is one of the main IDEs used on Windows so you should have no problem finding existing projects offering files in compatible formats.

The problem with Borland's free command line compiler is that the latest version of SDL is simply not compatible with it. Somewhere over the years of development, they stopped running Borland compile unit tests I guess so the source would have to be modified in order to get it to compile. If you were absolutely set on using that compiler though, then you will want to probably grab an older version of SDL, such as SDL-1.2.4. Following their Borland instructions:
Quote:
Using the free Borland C++ command-line compiler

The free Borland compiler can be downloaded at no charge from the Borland website . Make sure that it is installed and properly configured.

Open an MS-DOS Prompt. Change to the "Borland\freebcc" directory under the SDL source directory. Type "make -f SDL.mak" to build SDL and "make -f SDLmain.mak". There are also makefiles for all of the test programs, if you wish to build them. All .exes and DLLs are created in the "test" SDL directory. Ify ou would like to create the DLL and all the test applications, I have thrown together a basic batchfile called "makeall.bat" which should create everything in the right order.


I was able to get SDL to compile from source using that older version whereas the newer version is incompatible. However, using old versions of SDL such as this one is really not recommended due to how many bugs and changes were made over the years. You would have to work from old documentation and if you wanted to use any extra libraries such as SDL_Mixer, SDL_Image, SDL_TFF, you'd have to also find older versions that supported this old SDL version. What a hassle, especially for someone new to all this!

It's certainly doable if you really wanted the work, but you'd really be better advised to simply use a different compiler, such as the Visual C++ one or even a different one listed on the Lazy Foo setup pages that explains how to get going with it when you use SDL.

Share this post


Link to post
Share on other sites
Ahh okay. Thanks! I'm a student in college so I may as well just get the full IDE for free :) I'll just use borland for school assignments so I don't have to recompile and such to make sure it works both ways

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!