From: "Riox" References: <200004281112 DOT NAA29833 AT acp3bf DOT physik DOT rwth-aachen DOT de> <3909D92B DOT CC80284C AT pop DOT gis DOT net> <3909DD56 DOT 7BD63105 AT mtu-net DOT ru> Subject: Re: 3rd Try: Maybe an asm problem? (Problems linking) Date: Mon, 1 May 2000 22:45:07 +0200 Lines: 100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: <#PrW$66s$GA.197@net025s> Newsgroups: comp.os.msdos.djgpp NNTP-Posting-Host: ipc379a4dc.dial.wxs.nl 195.121.164.220 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Simply like this ASM source proc _SETpix__Fssc code code endproc where the 's' is standing for short int and the ''c'' is standing for char. (byte) I also had the same problem in the beginning. The declaration in the .h file wasnt right. together with the asm parameters extern void SETpix (short x, short y, char col); Now my code works fine with NASM and DJGGP. Riox / Desire. thiebosch AT hetnet DOT nl Alexei A. Frounze schreef in berichtnieuws 3909DD56 DOT 7BD63105 AT mtu-net DOT ru... > AFAIK you should add some characters to your external ASM subroutines... These > characters must represent type of passed parameters. I don't remember how > exactly, but that might help you. I don't add these chracters with plane C, but > parhaps they are needed for C++. > > -- > Alexei A. Frounze > ----------------------------------------- > Homepage: http://alexfru.chat.ru > Mirror: http://members.xoom.com/alexfru > > > Joseph Rose wrote: > > > > 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. > > > > ----------------------- > > /* > > file://Header for VGADr386 library. > > file://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. > >