SDL_mixer -- Link error on Mac

Hello, all,

I’ve downloaded SDL_mixer and build the library with MPW on MacOS.
When I link the library in my project ( CodeWarrior pro 4 ),
a link error occurs and it says,

undefined ‘__divs64’

and I don’t know what to do with this.
I think I need some other library but I can’t find what should be included
in my project.

Please tell me what to do.

My environment:

PowerMac G3
OS9
CodeWarrior pro 4
Universal Headers 3.2 ( or 3.3? I think the latest )
SDL_mixer 1.0.6

Thanks in advance.

Masahiro Minami
@Masahiro_Minami

------------------------------------ sent by Cyberdog
PowerMac G3/233/DT
MacOS 9
LinuxPPC

exception handling : www2.age.ne.jp/~except

undefined ‘__divs64’

Try adding MathLib (from Universal Interfaces) to your project.

Hi, Darrel,
thanks for your quick reply;)

But I have MathLib already in my project…

undefined ‘__divs64’

Try adding MathLib (from Universal Interfaces) to your project.

Thanks,

Masahiro Minami
@Masahiro_Minami

------------------------------------ sent by Cyberdog
PowerMac G3/233/DT
MacOS 9
LinuxPPC

exception handling : www2.age.ne.jp/~except

Hi, again,

undefined ‘__divs64’

Try adding MathLib (from Universal Interfaces) to your project.

According to Find Library ( of CodeWarrior ),

rt__divs64

is defined in some of the 68K libraries;
MSL AppRuntimeCFM68K.Lib
MSL DropInRuntimeCFM68K.Lib
MSL MWCFM68KRuntime.Lib
MSL ShLibRuntimeCFM68K.Lib
PASCAL (8d).68K.Lib
…etc…

Do you know anything about what to do with this ?
Or maybe my configurations or settings are not right ?

Thanks,

Masahiro Minami
@Masahiro_Minami

------------------------------------ sent by Cyberdog
PowerMac G3/233/DT
MacOS 9
LinuxPPC

exception handling : www2.age.ne.jp/~except

Masahiro Minami wrote:

Hi, again,

undefined ‘__divs64’

Try adding MathLib (from Universal Interfaces) to your project.

According to Find Library ( of CodeWarrior ),

rt__divs64

is defined in some of the 68K libraries;
MSL AppRuntimeCFM68K.Lib
MSL DropInRuntimeCFM68K.Lib
MSL MWCFM68KRuntime.Lib
MSL ShLibRuntimeCFM68K.Lib
PASCAL (8d).68K.Lib
…etc…

Do you know anything about what to do with this ?
Or maybe my configurations or settings are not right ?

Are you building a shared library or static library? What version of
Universal Interfaces are you using?

Hi, thanks for your reply, Darrel,

Are you building a shared library or static library? What version of
Universal Interfaces are you using?

Well, to be honest with you, I don’t understand what’s shared and static …!
Anyway, I’ve build SDL_mixer using MPW make file ( I think you are the
authour of that make file…?), then add the SDL_mixer.o file to my SDL based
game project.
I had 2 other link errors when I built the game project, so I’ve checked
Find Library and found out I need StdCLib; Then this one link error
remained.

As for Universal Headers, I’m using version 3.3.2.

Further information is very welcome !!!

Thanks,

Masahiro Minami
@Masahiro_Minami

------------------------------------ sent by Cyberdog
PowerMac G3/233/DT
MacOS 9
LinuxPPC

exception handling : www2.age.ne.jp/~except

Well, to be honest with you, I don’t understand what’s shared and static …!

Basically, shared libraries are libraries that link at run-time. Static
libraries link at compile-time.

Anyway, I’ve build SDL_mixer using MPW make file ( I think you are the
authour of that make file…?),

Nope, that’s Sam’s department :wink:

then add the SDL_mixer.o file to my SDL based

game project.
I had 2 other link errors when I built the game project, so I’ve checked
Find Library and found out I need StdCLib; Then this one link error
remained.

Okay, The key problem is that you are linking a library generated by MPW
with code generated by CodeWarrior, so obviously some problems will
arise.

Try linking with MSLStdCRuntime.PPC.LIB instead of MSLRuntime.PPC.LIB

HTH,
Darrell

Masahiro Minami wrote:

Hi, thanks for your reply, Darrel,

Are you building a shared library or static library? What version of
Universal Interfaces are you using?

Well, to be honest with you, I don’t understand what’s shared and static …!
Anyway, I’ve build SDL_mixer using MPW make file ( I think you are the
authour of that make file…?), then add the SDL_mixer.o file to my SDL based
game project.

Hehehe, shared and static are easy. A shared library is basically a DLL type
file. You know, it’s dynamically linked into the program upon execution. While
a static library is linked into the program during the linking process.>

I had 2 other link errors when I built the game project, so I’ve checked
Find Library and found out I need StdCLib; Then this one link error
remained.

As for Universal Headers, I’m using version 3.3.2.

Further information is very welcome !!!

Thanks,

Masahiro Minami
elsur at aaa.letter.co.jp

------------------------------------ sent by Cyberdog
PowerMac G3/233/DT
MacOS 9
LinuxPPC

exception handling : www2.age.ne.jp/~except


OOPMan (@OOPMan)
“He who fights with monsters should look to it that he himself
does not become a monster…When you gaze long into the abyss,
the abyss also gazes into you…” - Frederich Nietzsche

Thanks Darrel and OOPMan!

Well, to be honest with you, I don’t understand what’s shared and
static …!

Basically, shared libraries are libraries that link at run-time. Static
libraries link at compile-time.

Now I see :wink:

<…>

Okay, The key problem is that you are linking a library generated by MPW
with code generated by CodeWarrior, so obviously some problems will
arise.

I see.
What about adding all these SDL_mixer source files directory in my project?
Does that work?

Try linking with MSLStdCRuntime.PPC.LIB instead of MSLRuntime.PPC.LIB

Same result…

Thanks anyway.
I’ll try directry adding the source files.

HTH,
Darrell

Masahiro Minami
@Masahiro_Minami

------------------------------------ sent by Cyberdog
PowerMac G3/233/DT
MacOS 9
LinuxPPC

exception handling : www2.age.ne.jp/~except

Are you building a shared library or static library? What version of
Universal Interfaces are you using?

Well, to be honest with you, I don’t understand what’s shared and static …!

Having a static library it’s sort-of-like integrating it in the
program binary while you do the compilation… so you may have a
bigger binary to distribute (and licensing problems with LGPL if your
program is not LGPL), but you are sure that your program will
be running on any platform because it has the library in
itself.

Which a shared library instead you rely on an external library, which
is detached from your program. It means that you will have a smaller
binary and that the necessary library is avaiable on the system (you
may make it avaiable on a second time though with a smart install
program, however)…–
Davide Inglima, limaCAT - @Davide_Inglima
-> Kondara MNU/Linux Developer - http://www.kondara.org <-
-> Mount Is Not Unmount! <-