SDL with Borland Command Line Tools

I’ve been having a bit of difficulty with this…

Could someone please show me an example batch file that builds a SDL program, using BCC55 (Borland Command Line Tools v5.5) Including some add-on libraries, such as SDL_TTF or SDL_image would be greatly appreciated.

Thanks.

Xempest at comcast.net wrote:

Could someone please show me an example batch file that builds a SDL program, using BCC55 (Borland Command Line Tools v5.5) Including some add-on libraries, such as SDL_TTF or SDL_image would be greatly appreciated.

I suggest you not to use batch files, but use Borland’s make.

You can find makefile I use to build my game Njam here:

http://cvs.sourceforge.net/viewcvs.py/njam/njam/makefile.b32?rev=1.1&view=auto

It’s really simple. I also suggest you to read make help from BCC manual
for more info.

HTH–
Milan Babuskov
http://njam.sourceforge.net

Xempest at comcast.net wrote in
news:44893.0992548869$1066237452 at news.gmane.org:

I’ve been having a bit of difficulty with this…

Could someone please show me an example batch file that builds a SDL
program, using BCC55 (Borland Command Line Tools v5.5) Including some
add-on libraries, such as SDL_TTF or SDL_image would be greatly
appreciated.

Thanks.

What problem are you having with this exactly? You know the simple way to
compile a project using SDL under Borland’s compiler is to just do this:

bcc32 -lt -tW file1.cpp file2.cpp fileN.cpp sdlmain.lib sdl.lib
sdl_image.lib other_sdl.lib

and that should do the trick.

Personally I just use a makefile w/ my projects that use SDL. Here’s an
example of a makefile for one of my projects making use of SDL:

Borland C++ tools

IMPLIB= Implib
ILINK32= ILink32
BRC32= Brc32
TLIB= TLib
CC= BCC32

.autodepend
.nosilent
.path.obj=E:\Borland\myworkspace
.path.cpp=E:\Borland\myworkspace

Compiler and Linker flags

C_FLAGS= -tW -y -v -Od
L_FLAGS= -v -r -t

BCC32 RT lib: cw32.lib static cw32i.lib dynamic

BCC32RTLIB= cw32.lib

BCC32 Startup: c0x32.obj-console, c0w32.obj-winapi

BCC32STARTUP= c0w32.obj

#SDL stuff
SDL_LIB= SDL.lib SDLmain.lib SDL_image.lib

SRCS=
E:\Borland\myworkspace\test2.cpp
E:\Borland\myworkspace\testqueueclass.cpp

OBJS=
test2.obj
testqueueclass.obj

Dependency Rules

ProjectExecutable : $(OBJS)
$(ILINK32) @&&|-c +
$(L_FLAGS) +
$(BCC32STARTUP) +
$**, +
"$(.path.obj)\test2.exe", , +
import32.lib $(BCC32RTLIB) $(SDL_LIB)
|

.cpp.obj :
$(CC) -c $(C_FLAGS) -o$@ “$**”
@echo.