Mail Archives: djgpp/1998/02/06/01:25:48
At 04:38 2/5/1998 GMT, MATTRUD wrote:
>I have these two source files:
[snipped]
>So my question is, how do I call a function from a different source file, in
>this case, return0()?
First off, your syntax:
int i = extern return0();
is very bizzare and I'm not even sure if it's legal.
Your major problem here is that the compiler mangles names in a C++ file,
which causes unmangled names not to match. You need to do something like this:
extern "C" int return0(void);
/* ... */
i = return0();
Hope this helps.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -