473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

error during linking with gcc: multiple definition of `__cygwin_crt0_bp' ...

kai
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\
2. gcc test.cpp -o test.o

3. C:\tmp\rs\dev>gcc test.o -o "Project1.exe"
test.o(.data+0x0):fake: multiple definition of `__cygwin_crt0_bp'
J:\Software\WinProgs\cyggnu\h-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B*19\../../../../i386-cygwin32\lib\crt0.o(.data+0x0):crt0.c:

first defined here
test.o(.text+0x0):fake: multiple definition of `mainCRTStartup'
J:\Software\WinProgs\cyggnu\h-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B*19\../../../../i386-cygwin32\lib\crt0.o(.text+0x0):crt0.c:

first defined here
I don't get an executable.
What is the reason and how can I resolve this problem?
Thank's for your hints, Kai

Jul 18 '06 #1
2 14499
kai wrote:
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\
2. gcc test.cpp -o test.o

3. C:\tmp\rs\dev>gcc test.o -o "Project1.exe"
test.o(.data+0x0):fake: multiple definition of `__cygwin_crt0_bp'
J:\Software\WinProgs\cyggnu\h-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B*19\../../../../i386-cygwin32\lib\crt0.o(.data+0x0):crt0.c:

first defined here
test.o(.text+0x0):fake: multiple definition of `mainCRTStartup'
J:\Software\WinProgs\cyggnu\h-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B*19\../../../../i386-cygwin32\lib\crt0.o(.text+0x0):crt0.c:

first defined here
I don't get an executable.
What is the reason and how can I resolve this problem?
Thank's for your hints, Kai
This is a compiler-specific problem that you should take to a g++
forum. See this FAQ for what is on-topic here and for several other
newsgroups that you might try:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

Jul 18 '06 #2
kai wrote:
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\
2. gcc test.cpp -o test.o
<implementation specific/>

Change the above line to:

gcc -Wall -Wextra -pedantic -c test.cpp -o test.o

</implementation specific>

[snip]

Best regards,

Tom

Jul 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: pptran | last post by:
Hi, I am trying to rebuild our XS module using the newly installed Perl 5.8.4 with Dynamic Loading and 64-bit Integers enabled. During the XS make process, I ran into the following error...
2
by: RU | last post by:
Hi, I am working on a porting project to port C/C++ application from unixware C++, AT&T Standard components to g++ with STL on Linux. This application has been working properly on...
4
by: John | last post by:
Hi all; I write my first code using vector and list. When I run it, segmentation fault. Try to debug it, but it can not pass linking with -g option. What is the error with it? Thanks a lot....
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
1
by: yanwan | last post by:
Hello I met some problems in linking a project, and hope someone can give me some advice. -----------Configuration: lighting - Win32 Release-------------------- Linking... LINK : warning...
10
by: Sune | last post by:
Hi, previously I used Eclipse CDT for compiling my files just to get started with C and leave C++ behind. Now it's time to get a little more serious so I've moved my files to a new workplace and...
3
by: Felix Kater | last post by:
Hi, I've got the header myheader.h: #ifndef MY_HEADER #define MY_HEADER const int my_const_int = 99; /* ... */ #endif
2
by: zapr | last post by:
I am trying to compile on Mac OS X 10.4 my C program. I am stuck at the link phase where I get (gcc 4.01): $ gcc -s -Os -Wall -fprofile-arcs -fpack-struct -fno-common -ffast-math -ffloat-store...
2
by: pssraju | last post by:
Hi, At present application was built on solaris 9 using sun studio 9 (Sun C++ 5.6) & rouguewave sorce pro 5. We are planning to port the same application onto SuSE Linux 9.5.0 using GCC 3.3.3 & RW...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.