www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/25/16:22:19

Message-ID: <38DD15E3.BD51AB28@hotmail.com>
From: Heavy <heavier AT hotmail DOT com>
X-Mailer: Mozilla 4.6 [en]C-SYMPA (Win98; U)
X-Accept-Language: en,fr-CA
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: compiling with external assembly files
Lines: 20
Date: Sat, 25 Mar 2000 19:41:59 GMT
NNTP-Posting-Host: 216.209.30.197
X-Trace: news20.bellglobal.com 954013319 216.209.30.197 (Sat, 25 Mar 2000 14:41:59 EST)
NNTP-Posting-Date: Sat, 25 Mar 2000 14:41:59 EST
Organization: Sympatico
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi, I'm having a problem with an assembly file I am trying to compile
along with the rest of my program. It is a .s file, and there are no
problems with it (I have compiled it using .c just to make sure there
are no compile errors) however, I am unsure how to get it linked with my
.cpp files.

I have tried to #include it in a related .cpp file, but that didn't work
because it tried to compile it as a .cpp file, I have linked it as a .o
file, but I get an "undefined reference to myFunction(...)" error. I
have prototyped the function in a header file as extern, and I still get
the error. 

If I'm not mistaken, the proper way to write functions in external
assembly is to precede the name with an underscore, like "_myFunction:",
which I have done right. So what's my problem??

I would appreciate any information on this matter, Thanks

   Heavy
   heavier AT hotmail DOT com

- Raw text -


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