SDL and CodeWarrior

I’m trying to use SDL with CodeWarrior 4. Is this possible? I followed the
VisualC instructions and did what applied. I’ve added SDL.lib and
SDLmain.lib, and copied SDL.dll do my project dir. I also put SDL.dll in my
windows\system directory.

I’m trying to compile the code from the “Initializing the library” in the
API reference. I’m getting link errors about undefined symbols in SDL_main.obj.

I can’t copy and paste from codewarrior, but most of them are __iob. Others
are __pctype, __isctype, __mb_cur_max.

Does anyone know the steps needed to use SDL with codewarrior, or anything
that may help?

Thanks.

I’m trying to use SDL with CodeWarrior 4. Is this possible? I
followed the VisualC instructions and did what applied. I’ve added
SDL.lib and SDLmain.lib, and copied SDL.dll do my project dir. I
also put SDL.dll in my windows\system directory.

I’m trying to compile the code from the "Initializing the library"
in the API reference. I’m getting link errors about undefined
symbols in SDL_main.obj.

I can’t copy and paste from codewarrior, but most of them are __iob.
Others are __pctype, __isctype, __mb_cur_max.

Does anyone know the steps needed to use SDL with codewarrior, or
anything that may help?

Thanks.

This is CodeWarrior for Windows I take it? You mentioned a DLL,
though I’m used to CodeWarrior only being mentioned in the context of
Macs. I’ve been struggling myself to get it to work with SDL on the
Mac, as has Kyle on this list. He finally resorted to just including
the source code directly into the project, bypassing the whole shared
library deal. Not the best solution, but apparently the only one that
works.

However, up till now I had assumed the problem was the Mac
implementation of SDL, but if the same trouble exists with
CodeWarrior on the PC, maybe it’s a more general problem either with
SDL or with CodeWarrior. (I’d lean toward a combination of the two,
as CodeWarrior seems to work perfectly with everything else, and SDL
seems to work perfectly in most other development environments)

Any thoughts on this trouble, Sam?,-------------
| Michael Powell
| AKA Belar of the Mouth that Never Shuts
| AKA Mud the Repentant
| AKA Sancho the Large
| AKA Vlad the Hole Dweller
| AKA The Man of More Names then He can Remember

However, up till now I had assumed the problem was the Mac
implementation of SDL, but if the same trouble exists with
CodeWarrior on the PC, maybe it’s a more general problem either with
SDL or with CodeWarrior. (I’d lean toward a combination of the two,
as CodeWarrior seems to work perfectly with everything else, and SDL
seems to work perfectly in most other development environments)

SDL works and compiles fine with my own projects and the test programs with
the latest (I think) Metrowerks Code Warrior, on an iBook. It took the man
in charge a bit of strange tweaking though; I’d ask him to explain how he
did it, but he’s disappeared.

Nicholas

----- Original Message -----
From: belar@earthling.net (Mike Powell)
To: sdl at lokigames.com
Date: Monday, May 08, 2000 11:24 PM
Subject: Re: [SDL] SDL and CodeWarrior

However, up till now I had assumed the problem was the Mac
implementation of SDL, but if the same trouble exists with
CodeWarrior on the PC, maybe it’s a more general problem either with
SDL or with CodeWarrior. (I’d lean toward a combination of the two,
as CodeWarrior seems to work perfectly with everything else, and SDL
seems to work perfectly in most other development environments)

SDL works and compiles fine with my own projects and the test programs with
the latest (I think) Metrowerks Code Warrior, on an iBook. It took the man
in charge a bit of strange tweaking though; I’d ask him to explain how he
did it, but he’s disappeared.

By “the man in charge,” I assume you’re referring to Sam? He seems to
be pretty much the Man since I joined the list, but I haven’t been
around very long.

Course, part of the problem for both me and seemingly Eric Nielson as
well is that we aren’t using the latest CodeWarrior… That’d be
CodeWarrior Pro 5. Eric and I are using CodeWarrior Pro 4, and
upgrade ain’t cheap.

<returns to dreaming about the day when he’s snatched up by some
medium sized commercial gaming company (not big, like Squaresoft or
EA, cause then you got the middle management woes of a big company,
but medium, like Bungie with only a couple development teams and
minimal management) and makes massive wads of cash, not including
such expenses as the awesome computer and development environment he
needs to do his work>,-------------
| Michael Powell
| AKA Belar of the Mouth that Never Shuts
| AKA Mud the Repentant
| AKA Sancho the Large
| AKA Vlad the Hole Dweller
| AKA The Man of More Names then He can Remember

This is CodeWarrior for Windows I take it? You mentioned a DLL, though I’m
used to CodeWarrior only being mentioned in the context of Macs. I’ve been
struggling myself to get it to work with SDL on the Mac, as has Kyle on
this list. He finally resorted to just including the source code directly
into the project, bypassing the whole shared library deal. Not the best
solution, but apparently the only one that works.

However, up till now I had assumed the problem was the Mac implementation
of SDL, but if the same trouble exists with CodeWarrior on the PC, maybe
it’s a more general problem either with SDL or with CodeWarrior. (I’d lean
toward a combination of the two, as CodeWarrior seems to work perfectly
with everything else, and SDL seems to work perfectly in most other
development environments)

Any thoughts on this trouble, Sam?

Yes it is CodeWarrior for windows.

I went ahead and tried to just include the SDL source directly, as you
mentioned someone else did. I’m not sure if you meant include the whole
source, so before I tried that I decided to first try adding only
SDL_main.c. I really was not expecting this to work and saw absolutely no
reason why it would, but it did! Can anyone explain this?

So far I’ve set 64048016 and filled the screen white and everything seems
to be ok.

In my CodeWarrior project I have:

SDL.lib
SDLmain.lib
SDL.h
SDL_main.c

plus the usual windows libs and my source.

I also had to put SDL.dll in my \windows\system directory.

SDL.lib, SDLmain.lib, SDL.dll and SDL.h are from the
SDL-devel-1.1.2-VC6.zip file.
SDL_main.c is from the 1.1.2 source.

Oh and I actually have CodeWarrior Pro 5. This is my roomy’s program and
I’ve never used it before so I just went to Help|About Metrowerks… and it
told me it was 4.0, but the start menu says “CodeWarrior Pro 5”. hm.

Thanks for the input!

Eric.

However, up till now I had assumed the problem was the Mac
implementation of SDL, but if the same trouble exists with
CodeWarrior on the PC, maybe it’s a more general problem either with
SDL or with CodeWarrior.
I’ve had problems with making shared libraries in Codewarrior in the
past. It’s probably something I’m doing wrong, like a checkbox in a
submenu of the compiler option dialog box. But shared libraries my main
problems fall into two catagories: it compiles an empty library (fixed by
using an export list) or some of the functions return really weird data.
Back to the CodeWarrior docs…

KyleOn Mon, 8 May 2000, Mike Powell wrote:

Course, part of the problem for both me and seemingly Eric Nielson as
well is that we aren’t using the latest CodeWarrior… That’d be
CodeWarrior Pro 5. Eric and I are using CodeWarrior Pro 4, and
upgrade ain’t cheap.

MPW works very well for me, the only problems being Makefile maintenance
and some obscure C++ optimization bugs.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

It took the man
in charge a bit of strange tweaking though; I’d ask him to explain how he
did it, but he’s disappeared.

I’ve been through the tweaking process a few times now (well, a lot more
than a few :slight_smile: ). I got the shared library and stub library built OK (never
tried WIN32 though). But, of course, it still doesn’t work on CW 4. I am
thinking of installing CW 4 again and building up a new project file with
that. Anyone interested?

By “the man in charge,” I assume you’re referring to Sam? He seems to
be pretty much the Man since I joined the list, but I haven’t been
around very long.

Nono, the man in charge is Quetzal Bradley, lead Mac developer, which
consists of making sure that SDL works right. :slight_smile:

Course, part of the problem for both me and seemingly Eric Nielson as
well is that we aren’t using the latest CodeWarrior… That’d be
CodeWarrior Pro 5. Eric and I are using CodeWarrior Pro 4, and
upgrade ain’t cheap.

Dunno, haven’t tried 4, dunno if it works. Sam?

| Michael Powell

Nicholas

----- Original Message -----
From: belar@earthling.net (Mike Powell)
To: sdl at lokigames.com
Date: Monday, May 08, 2000 11:49 PM
Subject: Re: [SDL] SDL and CodeWarrior

Nono, the man in charge is Quetzal Bradley, lead Mac developer, which
consists of making sure that SDL works right. :slight_smile:

I’d better clarify: Quetzal is in charge of Kosmos Online’s Mac ports. Not
SDL’s Macintosh code.

Nicholas

----- Original Message -----
From: vining@pacificcoast.net (Nicholas Vining)
To: sdl at lokigames.com
Date: Tuesday, May 09, 2000 9:21 AM
Subject: Re: [SDL] SDL and CodeWarrior

Course, part of the problem for both me and seemingly Eric Nielson as
well is that we aren’t using the latest CodeWarrior… That’d be
CodeWarrior Pro 5. Eric and I are using CodeWarrior Pro 4, and
upgrade ain’t cheap.

MPW works very well for me, the only problems being Makefile maintenance
and some obscure C++ optimization bugs.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

I can sorta get it working with MPW. However, MPW is not a friendly
environment to work in. Makefile maintenance is a pain, especially
since it’s scripting language is based on obscure extended ASCII
characters, it’s error messages are comparatively cryptic and
difficult to track down (you can’t just double-click them), and, the
trouble which alienates me the most from it, I have yet to figure out
how to run any kind of debugger through MPW.,-------------
| Michael Powell
| AKA Belar of the Mouth that Never Shuts
| AKA Mud the Repentant
| AKA Sancho the Large
| AKA Vlad the Hole Dweller
| AKA The Man of More Names then He can Remember

I can sorta get it working with MPW. However, MPW is not a friendly
environment to work in. Makefile maintenance is a pain, especially
since it’s scripting language is based on obscure extended ASCII
characters, it’s error messages are comparatively cryptic and
difficult to track down (you can’t just double-click them), and, the
trouble which alienates me the most from it, I have yet to figure out
how to run any kind of debugger through MPW.

Oh yeah-- I was going to send you that extra copy of CodeWarrior I have
(a legal copy, of course). Sam, send me your snail-mail address again
and I’ll mail that to you ASAP.

-Roy

MPW works very well for me, the only problems being Makefile maintenance
and some obscure C++ optimization bugs.
I know this is a tad bit off topic… But does anybody have a copy of
MacOS X DR3?
With the fact that Mac OS X has a command line BSD layer, and the gnu
compiling software, my thought is that when MacOSX is released, that
the SDL compiling process for the MacOS could be handled by that.
Now my questions would be, would using the gnu tools on MacOSX still alow
you to use Carbon? This would allow the MacOSX version of SDL to be
based directly off of the existing Mac code, but also be compiled
like on any other unix platform.
Also, is there a cross compilation option to make apps in the pre-OSX
format (I know OSX uses Mach-O, but I can’t think of the name of the pre
OSX format off hand). If this where also possible, we would be able to
compile a library in OSX, and use it on pre-OSX system with codewarrior.

There seems to be a few places where both of these processes could break
down. But it if it where possible, then both versions of macos could be
handled in autoconf, thus elimating the need to redo the ‘why doesn’t
codewarrior work’ thread every few months.

Kyle