Compiling with builder 5

Hi:

I download de sources of sdl version 1.2.4 and I tried to compile 

it with builder 5.

I followed the instruction of the Borland.zip that is in the source 

but still it take me to an error in gl.h. I think it should be something
wrong in the project because I can compile the opengl examples that
comes with builder.

Any idea? Any help? Any information on web?

Thanks…
“Al hacer bien, evita que los otros lo sepan;
al hacer mal, evita saberlo tu” (Hijos de Dune)

Manolo Padron Martinez

What I have done to get the DLLs and such to compile under Builder 5 is to
use the freebcb files instead of the IDE files of the distribution. For
some reason I get the exact same errors you do using the IDE files,
something to do with gl.h.

When you installed Builder 5, you also installed the same utilities as the
free Builder compiler. So just follow the instructions for building the
makefiles and you’ll be alright. The DLLs will work under Builder 5 as
well.

My only grip with this so far is that to make a SDL program to run under
Builder 5, you need to create a console project(to get main() as your
entry point, instead of WinMain()) and Builder insists on popping up a
small console window before it your SDL window will appear. Other than
that it works fine, and I’ve integrated the VCL with SDL just for kicks
and it works wonders. Borland makes really good compilers, so I’m glad
I’ve been able to make it run with it. I just got Builder 6 tho, so I’m
going to have to check if the IDE files will compile with it.

~tk~----------------------------------------------------------------------

Chat with friends online, try MSN Messenger: Click Here

Hola Manolo,
I just had a quick look at the Builder files in BCB6 and I found that
the SDL.dll and SDLMain.lib projects are missing some projects options.
In the SDL.dll project you need the following conditional defines…
WIN32;BUILD_SDL;FREEBCC;ENABLE_WINDIB;ENABLE_DIRECTX;HAVE_ALLOCA=1;HAVE_OPENGL;NO_STRICT;_NO_VCL

In the SDLMain.lib project you need the following conditional defines…
_RTLDLL;NO_STRICT

With these changes all projects should compile.
2 of the demo projects do not have the correct path set but apart from
that all the demos I tested worked after the changes above.

The only downside is that the demos then require that you ship the
CBuilder created SDL.dll file, instead of the one that is created by Sam.

If you want to use the DLLs that Sam provides them you need to create a
CBuilder compliant lib by doing the following…
IMPLIB -a -c SDL.lib SDL.dll

Then you will be able to use Sam’s DLLs if you include the IMPLIB
created lib file in your projects.

I hope this helps.

L8R,

Dominique.

manolopm at cip.es wrote:> Hi:

I download de sources of sdl version 1.2.4 and I tried to compile
it with builder 5.

I followed the instruction of the Borland.zip that is in the source
but still it take me to an error in gl.h. I think it should be something
wrong in the project because I can compile the opengl examples that
comes with builder.

Any idea? Any help? Any information on web?

Thanks…
“Al hacer bien, evita que los otros lo sepan;
al hacer mal, evita saberlo tu” (Hijos de Dune)

Manolo Padron Martinez


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


http://www.DelphiGamer.com := for all your Object Pascal game
development needs;
http://www.delphi-jedi.org/Jedi:TEAM_SDL_HOME := Home of JEDI-SDL;
Cross-platform game development with Pascal, has never been easier.

HI Tk,
If you are interested I can send you the Builder 6 project files I
have just been working on. These should compile straight out of the Zip :).

L8R,

Dominique.

Time Killer wrote:> What I have done to get the DLLs and such to compile under Builder 5 is

to use the freebcb files instead of the IDE files of the distribution.
For some reason I get the exact same errors you do using the IDE files,
something to do with gl.h.

When you installed Builder 5, you also installed the same utilities as
the free Builder compiler. So just follow the instructions for building
the makefiles and you’ll be alright. The DLLs will work under Builder 5
as well.

My only grip with this so far is that to make a SDL program to run under
Builder 5, you need to create a console project(to get main() as your
entry point, instead of WinMain()) and Builder insists on popping up a
small console window before it your SDL window will appear. Other than
that it works fine, and I’ve integrated the VCL with SDL just for kicks
and it works wonders. Borland makes really good compilers, so I’m glad
I’ve been able to make it run with it. I just got Builder 6 tho, so I’m
going to have to check if the IDE files will compile with it.

~tk~


Chat with friends online, try MSN Messenger: Click Here
http://g.msn.com/1HM1ENCA/c144??PS=47575
_______________________________________________ SDL mailing list
SDL at libsdl.org http://www.libsdl.org/mailman/listinfo/sdl


http://www.DelphiGamer.com := for all your Object Pascal game
development needs;
http://www.delphi-jedi.org/Jedi:TEAM_SDL_HOME := Home of JEDI-SDL;
Cross-platform game development with Pascal, has never been easier.

Time Killer wrote:

What I have done to get the DLLs and such to compile under Builder 5 is
to use the freebcb files instead of the IDE files of the distribution.
For some reason I get the exact same errors you do using the IDE files,
something to do with gl.h.

Um, yes. As the origanal author of the IDE files, I think I just
thought of a compelling reason to never use them. When I was putting
them together, after certain IDE operations (I never really figured out
which), certain setting would return to there defaults. Although this
was really annoying to me, I knew what all the settings should be so I
could just set them again. Since the bcb5 and freebcc makefile
generated almost the same code (the free borland compiler has no
assembler! This is the only difference), I would suggest to always use
that. Sorry…

-- David Snopek

/-- libksd –
| The C++ Cross-Platform Game Framework
| Only want to write it once??
| http://libksd.sourceforge.net
------------