delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/26/05:16:32

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Maybe improper settings?
Date: 26 Apr 2000 08:49:25 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 24
Message-ID: <8e6ail$7iq$1@nets3.rz.RWTH-Aachen.DE>
References: <390660DF DOT 42CAF967 AT pop DOT gis DOT net>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 956738965 7770 137.226.32.75 (26 Apr 2000 08:49:25 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 26 Apr 2000 08:49:25 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Joseph Rose <jorose AT pop DOT gis DOT net> wrote:
> I'm having a problem linking object files and calling
> functions in one source file from another.  
[...]
> I can't get beyond the 'undefined reference' error
> messages.

You don't show any compilable source, your Makefile, or the actual
error message, which makes it close to impossible to be sure what your
error might be. But from various keywords you used, my main suspicion
is that you're trying to link assembly .o files with C++ code, and
didn't use 'extern "C"' in the header files that contain the
prototypes for those assembly functions. In a nutshell: put an

	extern "C" {
	/* all assembly function prototypes, here */
	}


in the interface header(s) for your assembly module(s). Look up the
meaning of this construct in your C++ textbook of choice.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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