Mail Archives: djgpp/1997/03/26/07:16:02
| From:  | Skye <s_c AT geocities DOT com>
 | 
| Newsgroups:  | comp.os.msdos.djgpp
 | 
| Subject:  | rhide link giving strange errors
 | 
| Date:  | Wed, 26 Mar 1997 00:48:56 -0800
 | 
| Organization:  | Uniserve
 | 
| Message-ID:  | <3338E2F8.7128@geocities.com>
 | 
| Reply-To:  | s_c AT geocities DOT com
 | 
| NNTP-Posting-Host:  | dy2-27.van.tvs.net
 | 
| Mime-Version:  | 1.0
 | 
| Lines:  | 63
 | 
| To:  | djgpp AT delorie DOT com
 | 
| DJ-Gateway:  | from newsgroup comp.os.msdos.djgpp
 | 
I'm new to djgpp so have patience.
I am getting linker errors with RHIDE when I complie and link this
simple program. I can compile and link ok using the command line.
I supose there is a switch that RHIDE uses that I need to turn off.
I'll keep poking away at it but any sugestions would help.
{This is just an example prog. to demonstrate my problem}
#include <stdio.h>
// basic class
class bb
{
 public:
 bb(){};
 void set(int i);
 int get();
 private:
 int h;
};
void bb::set( int i)
{
 h=i;
}
int bb::get()
{
 return h;
}
void main()
{
 bb t;
 t.set(9);
 printf("Set: %d\n",t.get());
}
Produces the following errors in RHIDE:
Compiling: test.cpp
no errors
Creating: test.exe
Error: test.o: In function 'bb::set(int)':
test.cc(21) Error:multiple definition of 'bb::set(int)'
o:test.cc(21) Error:first defined here
Error: test.o: In function 'bb::get(void)':
test.cpp(26) Error: multiple definition of 'bb::get(void)'
o:test.cc(26) Error: first defined here
Error: test.o: In Function 'main':
test.cc(31) Error: multiple definition of 'main'
o:cpptest.cc(31) Error: first defined here
There were some errors
Thanks,
sc
- Raw text -