Linking

Greetings,

I am using SDL, Mixer, PNGLib, ZLib, IMGLib, my own lib and my app 

in VC++6 under win2k.

I Use multithreaded debug for debugging and multithreaded for 

release for all modules.

Trouble is if i make a release version my app crashes with an 

access violation in sdl.dll during startup. However, the SECOND run
works!

I have no problems with the debug version. IF if build SDL as a 

release mutithreaded DLL, everything works fine too.

Which module should i be using with which runtime library? And has 

anyone else had this problem?

-dv

Can I get a simple answer without any Unix references or assumptions of
familiarity with anything please?

I’m using SDL on a Windows system, with DJGPP and Borland’s BCC32 compilers
to choose from. I do not have an IDE to work with, nor do I want one.

I cannot get the compilers to link in all the required files because SDL has
a large and deep directory structure for its source files. How do I link
these
files? Is there a simple command line switch to include sub-directories? Is
there an environment variable to be set? A pre-processor directive? An entry
in some sort of file? Or do I need to simply dump all the source files into a
single directory (in which case, why does SDL come with so many
sub-directories, and why isn’t linking covered in the documentation?)?

I know the above sounds a bit short, but I have tried at least three times now
and haven’t received any helpful reply (replies, yes, helpful, no). I’ve
heard
great things about SDL, it looks very useful, and I have some ideas I really
want to code with graphics and the like - but it is no good to me if I can’t
use SDL because it won’t link.

Thanks.

squigger

My home page - http://www.hotkey.net.au/~jasonjob

Utter damnation upon, those who mangle and misuse comma’s and, apostrophes’

squigger wrote:

I’m using SDL on a Windows system, with DJGPP and Borland’s BCC32
compilers to choose from. I do not have an IDE to work with, nor do
I want one.

You may want to check out MinGW - it’s more likely to work in a similar
way to GCC on Unix/Linux, which in turn means that you’ll be able to
draw on more of the information given on this list. DJGPP may not be
able to compile SDL because it’s a DOS compiler, whereas SDL uses
Windows functionality. Borland’s BCC32 should be capable of compiling
it, but due to being a less common compiler, help is less likely to be
forthcoming. So my advice is for you to get hold of MinGW, which is free
to download and better-supported (by the community) than either of the
above compilers.

I cannot get the compilers to link in all the required files because
SDL has a large and deep directory structure for its source files.
How do I link these
files?

Generally, there’s a file in the root directory called ‘Makefile’. You
run a program called ‘Make’ which looks for a file of that name in the
current directory, and reads the instructions from that Makefile. It
then calls GCC for you on each of the relevant files.

I’m no makefile expert, due to being a Windows person, but I’d be
surprised if one didn’t come in the archive file. It should ‘work’ with
DJGPP’s make (although the entire compilation process probably will not)
and will almost certainly work with MinGW’s Make.

I know the above sounds a bit short, but I have tried at least three
times now and haven’t received any helpful reply (replies, yes,
helpful, no). I’ve heard
great things about SDL, it looks very useful, and I have some ideas I
really want to code with graphics and the like - but it is no good to
me if I can’t use SDL because it won’t link.

You are aware that, for many purposes, you don’t need to build SDL
yourself, right? (Especially since you’re on Win32.) You only need to be
able to use the header file and the link library, providing the library
is of the correct format?

Some links I found for you:
http://www.libsdl.org/release/SDL-devel-1.2.5a-mingw32.tar.gz
(development library prebuilt, if you’re using MinGW)
http://www.spacejack.org/games/mingw/mingw-sdl.html (instructions)
http://www.csse.monash.edu.au/~timf/cse5302/assignment.html
(instructions)
http://www.libsdl.org/faq.php?action=listentries&category=4#46 (for
Borland)
http://www.libsdl.org/extras/win32/mingw32/README.txt

Good luck.–
Kylotan
http://pages.eidosnet.co.uk/kylotan

At 01:58 AM 12/04/2003 +0100, you wrote:

squigger wrote:

I’m using SDL on a Windows system, with DJGPP and Borland’s BCC32
compilers to choose from. I do not have an IDE to work with, nor do
I want one.

You may want to check out MinGW - it’s more likely to work in a similar
way to GCC on Unix/Linux, which in turn means that you’ll be able to
draw on more of the information given on this list. DJGPP may not be
able to compile SDL because it’s a DOS compiler, whereas SDL uses
Windows functionality. Borland’s BCC32 should be capable of compiling
it, but due to being a less common compiler, help is less likely to be
forthcoming. So my advice is for you to get hold of MinGW, which is free
to download and better-supported (by the community) than either of the
above compilers.

I’ll have a look. Thanks.

I cannot get the compilers to link in all the required files because
SDL has a large and deep directory structure for its source files.
How do I link these
files?

Generally, there’s a file in the root directory called ‘Makefile’. You
run a program called ‘Make’ which looks for a file of that name in the
current directory, and reads the instructions from that Makefile. It
then calls GCC for you on each of the relevant files.

I’m no makefile expert, due to being a Windows person, but I’d be
surprised if one didn’t come in the archive file. It should ‘work’ with
DJGPP’s make (although the entire compilation process probably will not)
and will almost certainly work with MinGW’s Make.

The only make I found with SDL was what looks like a Unix script of some
sort.

I know the above sounds a bit short, but I have tried at least three
times now and haven’t received any helpful reply (replies, yes,
helpful, no). I’ve heard
great things about SDL, it looks very useful, and I have some ideas I
really want to code with graphics and the like - but it is no good to
me if I can’t use SDL because it won’t link.

You are aware that, for many purposes, you don’t need to build SDL
yourself, right? (Especially since you’re on Win32.) You only need to be
able to use the header file and the link library, providing the library
is of the correct format?

Er, no, I wasn’t aware. Please, tell me more.

Some links I found for you:
http://www.libsdl.org/release/SDL-devel-1.2.5a-mingw32.tar.gz
(development library prebuilt, if you’re using MinGW)
http://www.spacejack.org/games/mingw/mingw-sdl.html (instructions)
http://www.csse.monash.edu.au/~timf/cse5302/assignment.html
(instructions)
http://www.libsdl.org/faq.php?action=listentries&category=4#46 (for
Borland)
http://www.libsdl.org/extras/win32/mingw32/README.txt

Good luck.

Many thanks.

squigger

My home page - http://www.hotkey.net.au/~jasonjob

Utter damnation upon, those who mangle and misuse comma’s and, apostrophes’

At 01:58 AM 12/04/2003 +0100, you wrote:

Generally, there’s a file in the root directory called ‘Makefile’. You
run a program called ‘Make’ which looks for a file of that name in the
current directory, and reads the instructions from that Makefile. It
then calls GCC for you on each of the relevant files.

I’m no makefile expert, due to being a Windows person, but I’d be
surprised if one didn’t come in the archive file. It should ‘work’ with
DJGPP’s make (although the entire compilation process probably will not)
and will almost certainly work with MinGW’s Make.

The only make I found with SDL was what looks like a Unix script of some
sort.

I know the above sounds a bit short, but I have tried at least three
times now and haven’t received any helpful reply (replies, yes,
helpful, no). I’ve heard
great things about SDL, it looks very useful, and I have some ideas I
really want to code with graphics and the like - but it is no good to
me if I can’t use SDL because it won’t link.

You are aware that, for many purposes, you don’t need to build SDL
yourself, right? (Especially since you’re on Win32.) You only need to be
able to use the header file and the link library, providing the library
is of the correct format?

Er, no, I wasn’t aware. Please, tell me more.

Some links I found for you:
http://www.libsdl.org/release/SDL-devel-1.2.5a-mingw32.tar.gz
(development library prebuilt, if you’re using MinGW)
http://www.spacejack.org/games/mingw/mingw-sdl.html (instructions)
http://www.csse.monash.edu.au/~timf/cse5302/assignment.html
(instructions)
http://www.libsdl.org/faq.php?action=listentries&category=4#46 (for
Borland)
http://www.libsdl.org/extras/win32/mingw32/README.txt

Good luck.

Many thanks.

squigger

My home page - http://www.hotkey.net.au/~jasonjob

Utter damnation upon, those who mangle and misuse comma’s and, apostrophes’

Hello,

Maybe, this link may be useful, to install correctly SDL with mingw :
http://www.libsdl.org/extras/win32/mingw32/README.txt
If you follow all the steps carrefully, you should get an environment ready
for developping with SDL. (I got one)

You said that you don’t know much about Unix, so maybe this may be useful (I
haven’t try it) to compile your programs :
http://www.spacejack.org/minide/
and this for the installation of SDL, it’s a tutorial about unix commands
http://www.ee.surrey.ac.uk/Teaching/Unix/

Using mingw implies learning some unix commands… This will be useful when
you’ll try linux (I am sure you will).

I have never tried Borland, the Borland.html in the SDL sources package
contains useful information. The borland specific files are in the
Borland.zip file in the sources package.

Julien