From: Joseph Rose Newsgroups: comp.os.msdos.djgpp Subject: Re: 3rd Try: Maybe an asm problem? (Problems linking) Date: Fri, 28 Apr 2000 14:32:11 -0400 Organization: Posted via Supernews, http://www.supernews.com Lines: 42 Message-ID: <3909D92B.CC80284C@pop.gis.net> References: <200004281112 DOT NAA29833 AT acp3bf DOT physik DOT rwth-aachen DOT de> X-Complaints-To: newsabuse AT supernews DOT com X-Mailer: Mozilla 4.7 [en]C-NECCK (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Just before my last message, I put 'extern' before the prototypes of the asm functions in my header. I forgot to post the header. It follows. ----------------------- /* //Header for VGADr386 library. //Requires dpmi.h. */ #ifndef _VGADraw_internal extern short VidSel; extern __dpmi_paddr VidBuffer; extern char TmpVidBuffer [63999]; #endif extern void SetGrMode (void); extern void Draw_Line_Horiz (int X, int Y, int Len, char Col); extern void Draw_Line_Vert (long X, long Y, short Len, char Col); extern void Draw_Tri (long X1, long Y1, long X2, long Y2, long X3, long Y3, char Col); -------------------------------- Hans-Bernhard Broeker wrote: > In article <39096460 DOT 1D069B39 AT pop DOT gis DOT net> you wrote: > > When I link the test code for my graphics library, I get no error > > message on references to C++ functions, but I get 'undefined reference' > > error messages at every line of C++ code containing a function call to > > an assembler routine. I'm using nasm; GLOBAL statements appear at the > > beginning of the source for about every function in the source without > > any extra specifiers, and my functions start with just a label followed > > by a colon. Every other technique I've tried didn't assemble at all. > > Unless my memory fails me even more badly than usually, I've already > answered that question, answering an earlier posting of yours: > > You need 'extern "C"' qualifiers in the prototypes for those > assembly functions. > > -- > Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) > Even if all the snow were burnt, ashes would remain.