delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/25/02:31:02

Message-Id: <3.0.6.32.19990225022755.00908900@pop.globalserve.net>
X-Sender: derbyshire AT pop DOT globalserve DOT net
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Thu, 25 Feb 1999 02:27:55 -0500
To: djgpp AT delorie DOT com
From: Paul Derbyshire <pderbysh AT usa DOT net>
Subject: Re: URGENTLY!!! An ASM problem
In-Reply-To: <10AFD73297D@pcc.tgm.ac.at>
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019