delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/26/06:10:43

From: nikki AT gameboutique DOT co (nikki)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: dumb linking question
Date: 26 Jan 1997 02:37:10 GMT
Organization: GameBoutique Ltd.
Lines: 29
Message-ID: <5ceg0m$dt3@flex.uunet.pipex.com>
References: <32eaacbb DOT 8162931 AT ursa DOT smsu DOT edu>
Reply-To: nikki AT gameboutique DOT co
NNTP-Posting-Host: www.gameboutique.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> >when i try to compile this i get unresolved reference to wibble errors. :( from *both* pieces of code
> 
> Since I'm not familiar with NASM, this may not apply: Have you declared wibble()
> as public from within your assembly file?  Are you sure you are linking all the
> necessary files?  Your message was pretty vague as to all the steps you took.

well nasm doesn't appear to have a public construct or i would have yes. it says in the
text file that using [EXTERN label] will make it external in exactly the same way a c construct would work. i was therefore treating it as such. the steps i took were :

nasm -f coff wibble.asm (which produces wibble.o with no errors or warnings)

then i compiled another piece of code, something.c under rhide, i forget what the command line version of that would be in gcc but i get another .o file. and finally..

gcc -o test wibble.o something.o

which gives the unresolved references. the problem i think is, as you say, the public thing. but there seems to be no equivalent to this in nasm :( hence my usage of EXTERN
instead.


regards,
nik



-- 
Graham Tootell           GameBoutique Ltd. - THE online gaming experience
nikki AT gameboutique DOT com   http://www.gameboutique.com


- Raw text -


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