delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/31/00:47:49

From: Michelle Barrette <michelle DOT barrette AT sympatico DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Problem with multiple source files
Date: Wed, 31 Dec 1997 00:37:49 -0500
Organization: Bell Solutions
Lines: 15
Message-ID: <34A9DA2D.6699@sympatico.ca>
Reply-To: michelle DOT barrette AT sympatico DOT ca
NNTP-Posting-Host: 206.172.240.76
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm trying to split a project (which was becoming way too big) but I'm
having troubles with global variables when compiling:
- I have two C files and one header file
- One of the C files contains the variables declared normally
- The header contains the same declarations with 'extern' in front of
each
- I #include the header in both C files

I get some 'undefined reference' errors and after that I get a bunch of 
'bfd assertion fail coff-i386.c:368' from ld
I found some doc on the Net but according to it, I'm doing everything
right! So what's the problem ?

the puzzled one
Gael

- Raw text -


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