Mail Archives: djgpp/2001/04/01/10:32:36
From: | Kevin <kevin AT effessnet DOT fsnet DOT co DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Rhide/DJGPP Multiple source file problems.
|
Date: | Sun, 01 Apr 2001 15:25:27 +0100
|
Lines: | 61
|
Message-ID: | <5pcectc76iigqk93ulqu1v9ooo0o4dheks@4ax.com>
|
NNTP-Posting-Host: | modem-86.arizona.dialup.pol.co.uk
|
Mime-Version: | 1.0
|
X-Trace: | news7.svr.pol.co.uk 986135251 19036 62.137.54.86 (1 Apr 2001 14:27:31 GMT)
|
NNTP-Posting-Date: | 1 Apr 2001 14:27:31 GMT
|
X-Complaints-To: | abuse AT theplanet DOT net
|
X-Newsreader: | Forte Agent 1.7/32.534
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hi All,
I have form for asking dumb questions, so this is probably another
one.
I have looked at the FAQ and the docs on DJs site, but haven't managed
to find an answer.
I'm not sure that this is relevant, but
I am working in windows 98's DOS mode, i.e with a boot disk,
as windows 98 or my computer wont run programs which use the DZCOMM
serial communications library. So, I have copied the library file
libstdcxx.a to libstdcx.a and changed the [RHIDE] section of djgpp.env
to reflect this change (In order to overcome the long file name
problem). All is working OK, so far, but I have only been working with
single source file projects.
I have been working on a program which, up until now, I have been
happy to keep in one source file. I have now decided it would be nice
to work with several smaller files.
I made a file called GPS1.h
and put all my include directives, my structure defines and my
function prototypes in this file.
I started the file with
#ifndef _GPS1_h_
#define _GPS1_h_
and ended it with
#endif
I have split the source file up in to
term.cpp, which contains the main() function along with many others
and
selector.cpp which contains a function called selector
both source files start with
#include "GPS1.h"
but don't include any other headers.
Compilation works ok, but when it is linking, RHIDE
comes up with the following messages: -
Creating: GPS.exe
Error: term.o: In function `com1_at_exit(void)':
Error: term.cpp(.text+0x4): multiple definition of
`com1_at_exit(void)'
Error: selector.o(.text+0x4):selector.cpp: first defined here
Error: term.o(.data+0x0):term.cpp: multiple definition of `port1'
Error: selector.o(.data+0x0):selector.cpp: first defined here
There were some errors
Does anyone have an idea of where I'm going wrong ?
Any help would be much appreciated as the single source
file method is starting to become a bit unwieldy.
Kevin.
- Raw text -