Mail Archives: djgpp/1999/02/25/02:31:02
At 04:46 PM 2/22/99 MET-1MDT, you wrote:
>Hello people,
>I'm writing a multichannel SB system for DJGPP. Now I wanna write the
>mixing routines in Assembler. I wrote them for NASM, and NASM
>assembled fine. But when I try to include my routines in the C code,
>the linker says "not found". The mixing routines are set to GLOBAL
>( [GLOBAL _Mix_Voice] ) but it doesn't work!!
If you're programming in C++ it's a name mangling issue.
_Mix_Voice is a C mangled name. You need to specify it extern "C" like this:
extern "C" foo Mix_Voice (bar x, baz y);
Then it will look for the symbol _Mix_Voice at link time instead of
something like _Mix_Voice_barbaz.
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." -------------------------------------------------
-- B. Mandelbrot |http://surf.to/pgd.net
_____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|
- Raw text -