This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Help for GCC newbie



Hello,

I have been trying to get GCC 3.0.4 which i downloaded and built to build 
even the simplest 'Hello World' programs.  I get the following  linker 
errors after a simple 'Hello World' has been compiled and similar errors 
when trying to build a C program (albeit the C runtime libraries are 
mentioned instead) - can anyone help me.  Thanks.

I compile my program using:
g++ -W -pedantic -o test.o test.cpp  (this works ok)
g++ -o test.exe test.o

test.o: In function `main':
/home/mark/C++programming/test.cpp:14: multiple definition of `__dso_handle'
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/crtbegin.o(.data+0x0): first 
defined here
test.o: In function `_init':
test.o(.init+0x0): multiple definition of `_init'
/usr/lib/crti.o(.init+0x0): first defined here
test.o: In function `_start':
test.o(.text+0x0): multiple definition of `_start'
/usr/lib/crt1.o(.text+0x0): first defined here
test.o: In function `main':
/home/mark/C++programming/test.cpp:14: multiple definition of `_fini'
/usr/lib/crti.o(.fini+0x0): first defined here
test.o: In function `main':
/home/mark/C++programming/test.cpp:14: multiple definition of 
`_GLOBAL_OFFSET_TABLE_'
/usr/lib/crti.o(.got.plt+0x0): first defined here
test.o: In function `main':
/home/mark/C++programming/test.cpp:14: multiple definition of 
`_IO_stdin_used'
/usr/lib/crt1.o(.rodata+0x4): first defined here
test.o: In function `main':
/home/mark/C++programming/test.cpp:14: multiple definition of `__data_start'
/usr/lib/crt1.o(.data+0x0): first defined here
/usr/lib/crti.o(.dynamic+0x0): multiple definition of `_DYNAMIC'
collect2: ld returned 1 exit status
make: *** [build] Error 1



_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]