Welcome, Guest. Please login or register.

Author Topic: g++ amiga specific error... Need help  (Read 583 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline LPTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2003
  • Posts: 358
    • Show only replies by LP
    • http://bailout.dk
g++ amiga specific error... Need help
« on: December 02, 2003, 03:08:51 AM »
This is what my output is from the compiler:

RAM:CDIndex(.text+0x7bda): multiple definition of `basic_string, __default_alloc_template >::basic_string(basic_string, > const &)'
RAM:CDIndex(.text+0x7ac0): first defined here
RAM:CDIndex(.text+0x1a1b4): multiple definition of `exit'
/t/ccJo7YG9.o(.text+0x0): multiple definition of `main'
RAM:CDIndex(.text+0x330): first defined here
/t/ccJo7YG9.o(.text+0x102): multiple definition of `menu(Cd)'
RAM:CDIndex(.text+0x432): first defined here
/t/ccoanFsD.o(.text+0x0): multiple definition of `Cd::addNewCD(void)'
RAM:CDIndex(.text+0x102c): first defined here
/t/ccoanFsD.o(.text+0xaa): multiple definition of `Cd::addNewCDDialog(void)'
RAM:CDIndex(.text+0x10d6): first defined here
/t/ccoanFsD.o(.text+0x2b0): multiple definition of `Cd::setAttributes(void)'
RAM:CDIndex(.text+0x12dc): first defined here
collect2: ld returned 1 exit status

CDIndex is the executable I'm trying to build...

This only comes out when I add the parameter -ox
where x is an integer from 1 to 3 :-)
When using just -o it compiles fine and runs fine...

What does this -o(ptimization) option do?

I'm positive my definitions and declarations are ok.
The program can compile on the g++ for windows without complaining... (I know this is not nessesarily a guaranty but still)

Any ideas are welcome... What is g++ trying to say to me?

Tanx
 

Offline Eniodis

  • Newbie
  • *
  • Join Date: Feb 2003
  • Posts: 17
    • Show only replies by Eniodis
Re: g++ amiga specific error... Need help
« Reply #1 on: December 02, 2003, 08:59:48 AM »
Hello,

g++ is telling you it cannot link your program.

The command line of g++ is case sensitive... "-o" and "-O" are 2 different options :
- "-o" is used for linking
- "-Ox" for any optimization.
 

Offline LPTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2003
  • Posts: 358
    • Show only replies by LP
    • http://bailout.dk
Re: g++ amiga specific error... Need help
« Reply #2 on: December 02, 2003, 02:10:49 PM »
Thanks...

That made it run fine again...

Got to read some more of those guides :-)