X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "John Hanley" Newsgroups: comp.os.msdos.djgpp Subject: errors when linking Date: Thu, 26 Aug 2004 14:25:14 -0600 Organization: University of Alberta Lines: 24 Message-ID: <1093551837.155041@proxy2.srv.ualberta.ca> NNTP-Posting-Host: proxy2.srv.ualberta.ca X-Trace: tabloid.srv.ualberta.ca 1093551837 8121 129.128.5.161 (26 Aug 2004 20:23:57 GMT) X-Complaints-To: abuse AT ualberta DOT ca NNTP-Posting-Date: Thu, 26 Aug 2004 20:23:57 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Cache-Post-Path: proxy2.srv.ualberta.ca!unknown AT d199-126-23-72 DOT abhsia DOT telus DOT net X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have a program where both my main.c and program.c files use the program.h file. So I #include "program.h" in both the .c files. The program.h file is set up with only declarations of 3 structs and a bunch of functions and some global variables. My program.c file defines and uses the functions, and my main.c file uses a few of the functions. Yet when I build my program, the DJGPP compiler tells me there are multiple definitions of each of my _functions and undefined references to my _global variables. Both my .c files comile with no errors, but when linked they give me these errors. Any ideas as to what might be the problem in this type of situation? Thanks! John