www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/05/17:04:11

From: "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Declaring external assembly procedures
Date: Thu, 5 Feb 1998 10:28:50 -0800
Organization: Hewlett Packard
Lines: 27
Message-ID: <6bd0cv$gba$1@rosenews.rose.hp.com>
References: <6bav9a$mlo AT camel18 DOT mindspring DOT com>
NNTP-Posting-Host: ros51675cra.rose.hp.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


>global _Test

Here you are declaring a function which would be called Test in C (not C++).


>// extern int Test (void);
>   x = Test();
> When I uncomment the extern statement, however, I get a SIGSEGV error,

Here you are telling it to look for _Test__Fv.  Here is the call statement
that the compiler generates.

call _Test__Fv

>I've also installed RSXNTDJ, if that
>does anything funky to the compiler. Thanks for any help,
I think the linker for RSX doesn't give you errors about unresolved
externals, which is what you have.
Either rename your function in the nasm module, or specify to use C style
mangling in your extern (extern "C")

HTH

Andy

- Raw text -


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