gnu.gcc.help
[Top] [All Lists]

Re: error during linking: multiple definition of `__cygwin_crt0_bp' ...

Subject: Re: error during linking: multiple definition of `__cygwin_crt0_bp' ...
From: Michael Mair
Date: Tue, 18 Jul 2006 21:50:47 +0200
Newsgroups: gnu.gcc.help
kai rostenthal schrieb:
Hello,

I wrote a little c++-program (hallo world) and I wanted to compile and
link this.

my steps:
1. set
GCC_EXEC_PREFIX=J:\Software\WinProgs\cyggnu\h-i386-cygwin32\lib\gcc-lib\

You do not need that for gcc under cygwin if you don't do strange
things. Most of the time, it is best to leave the cygwin standard
installation as it is.


2. gcc test.cpp -o test.o

Hold right there: C++ -> g++

3. C:\tmp\rs\dev>gcc test.o -o "Project1.exe"
<snip: linker errors>

C and C++ work different w.r.t. linking.
The above tries to link C++ object files with the C linker.
Use g++ instead.

Apart from that: Post always a minimal (compiling, if possible)
code example -- otherwise, the problem may reside in the part
you did not show.


Cheers
 Michael
--
E-Mail: Mine is an   /at/ gmx /dot/ de   address.

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy