Strona 1 z 1

Błąd pakietu build-essential?

: 24 kwie 2010, 10:08
autor: Broi
Witam, mam problem. Mianowicie wczoraj sobie jeszcze coś kodziłem i mi ładnie kompilowało wszystko, a dziś przy próbie skompilowania nawet najprostszego programu (program z samym mainem bez żadnych bibliotek) pojawiają mi się następujące błędy:

Kod: Zaznacz cały

broi@BroiSatse:~/Studia/Programowanie/Matma$ c++ -o Complex.cpp test
test: In function `_start':
/build/buildd/eglibc-2.10.1/csu/../sysdeps/i386/elf/start.S:65: multiple definition of `_start'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:/build/buildd/eglibc-2.10.1/csu/../sysdeps/i386/elf/start.S:65: first defined here
test:(.rodata+0x0): multiple definition of `_fp_hw'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:(.rodata+0x0): first defined here
test: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crti.o:(.fini+0x0): first defined here
test:(.rodata+0x4): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:(.rodata.cst4+0x0): first defined here
test: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:(.data+0x0): first defined here
test: In function `__data_start':
(.data+0x4): multiple definition of `__dso_handle'
/usr/lib/gcc/i486-linux-gnu/4.4.1/crtbegin.o:(.data+0x0): first defined here
test: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crti.o:(.init+0x0): first defined here
/usr/lib/gcc/i486-linux-gnu/4.4.1/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
test:(.dtors+0x4): first defined here
/usr/bin/ld: warning: Cannot create .eh_frame_hdr section, --eh-frame-hdr ignored.
/usr/bin/ld: error in test(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
Ta więc pomocy, bo troche mnie to drażni. :P

Odp: Błąd pakietu build-essential?

: 24 kwie 2010, 10:12
autor: michal12345

Kod: Zaznacz cały

c++ -o Complex.cpp test
Czemu tak? a nie:

Kod: Zaznacz cały

g++ -o Complex.cpp test

Odp: Błąd pakietu build-essential?

: 24 kwie 2010, 10:17
autor: Broi
A nie wiem, jakoś wolę w ten sposób... :) g++ daje ten sam błąd...

//btw: jest jakaś konkretna róznica między tymi poleceniami?

Odp: Błąd pakietu build-essential?

: 24 kwie 2010, 17:39
autor: beluosus

Kod: Zaznacz cały

           [-o outfile] [@file] infile...

Kod: Zaznacz cały

g++ -o test Complex.cpp
:wall:

Kod: Zaznacz cały

lrwxrwxrwx 1 root root 3 03-18 17:50 /usr/bin/c++ -> g++

Odp: Błąd pakietu build-essential?

: 24 kwie 2010, 21:19
autor: Broi
Że się tak wyrażę: ee?

Dobra, tak głupi błąd że aż przykro, że go miałem przez cały dzień jeden... :P

Powinno być

Kod: Zaznacz cały

c++ Complex.cpp -o test
. proszę o zamknięcie lub najlepiej skasowanie, bo jak ja się ludziom na oczy pokażę... :P