delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/28/11:29:37

From: "David May" <dmay AT tvi DOT cc DOT nm DOT us>
Organization: Albuquerque T-VI
To: nikki AT gameboutique DOT co
Date: Tue, 28 Jan 1997 09:15:37 -0700
Subject: Re: dumb linking question
CC: djgpp AT delorie DOT com
Message-ID: <14A2EE71AB7@tvi_mail.tvi.cc.nm.us>

> ok, this must be something stupid i'm doing because i can't even find a reference to it in the faq :(
> i have 2 programs, one has a routine called wibble which is extern'd
> the other file consists of :
> 
> int wibble(void);
> 
> void main() {
> 	printf("%d \n",wibble());
> }
> 
> when i try to compile this i get unresolved reference to wibble errors. :( from *both* pieces of code
> what on earth am i doing wrong? usually i would use extern int wibble(void); in this code and define the code in the other routine, but in this case the other routine is assembler and i don't know h
> 
> regards,
> nik

We need more info.  Are either of (or both) these being compiled 
as C++ files?  You might surround everything with
  #ifdef __cplusplus
  extern "C" {
  #endif

and

  #ifdef __cplusplus
  }
  #endif

and see if the problem disappears. Other than that, I can't think of 
what might cause it.
David May, ID Card Administrator
Albuquerque TVI

- Raw text -


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