473,396 Members | 1,860 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,396 software developers and data experts.

error compiling stl samples with g++ in cygwin

I downloaded sample codes from http://www.cs.rpi.edu/~musser/stl-book/source/src.zip
and tried to compile them.

I started my cygwin on xp, renamed Makefile.unix to Makefile and typed
"make". After several successful compilation, it spat out following
error :

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):
(.text+0xab): undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
make: *** [ex04-01] ¿À·ù 1

There's no WinMain in the code. Strangely, when I retried "make",
compile is succuessful for the file but again after several succuess,
make complain with the same error message with another source code.

What can cause the problem?

TIA.

May 2 '07 #1
1 2292
TheOne wrote:
I downloaded sample codes from http://www.cs.rpi.edu/~musser/stl-book/source/src.zip
and tried to compile them.

I started my cygwin on xp, renamed Makefile.unix to Makefile and typed
"make". After several successful compilation, it spat out following
error :

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):
(.text+0xab): undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
make: *** [ex04-01]

There's no WinMain in the code. Strangely, when I retried "make",
compile is succuessful for the file but again after several succuess,
make complain with the same error message with another source code.

What can cause the problem?
Wrong group. Try gnu.g++.help.

F/U set.

May 2 '07 #2

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

Similar topics

1
by: alex | last post by:
Hello I have some c++ code, which has been happily developped in the linux/unix world. Everything has always been compiled with different compiler (intel, KAI, g++...) and gnu makefiles For...
12
by: Eugene A | last post by:
Hello. I am trying to compile a linux socket server and a client in cygwin on windows. The g++ version is 3.3.1. The source was obtained from this location: ...
22
by: TuPLaD | last post by:
Hello, I just made a little C++ console application: #include "iostream" using namespace std; int main () { cout << "Hello Mars !"; return 0;
1
by: endo55 | last post by:
Hi I've got the following errors when trying to compile a program cvision error LNK2001: unresolved external symbol _IID_IGraphBuilde cvision error LNK2001: unresolved external symbo...
17
by: abdur_rab7 | last post by:
Hi, I am compiling code for nanosleep in CYGWIN. During compilation i get the following error Socket.cc: In method `bool Socket::hangOnConnection(int = 0)': Socket.cc:338: aggregate `struct...
1
by: edwardzyang | last post by:
I am running Windows XP with cygwin with gcc 3.4.4-1 and gdb 20060706-2. I compiled this very simple program: #include <iostream> using namespace std; int main(int argc, char (*(argv)) ) {...
16
by: Micko1 | last post by:
Hello there :) I have been using Visual Studio on a program which I have just completed, however I need to have it compiling using a unix based compiler, when I try in cygwin, I get the following...
3
lifeisgreat20009
by: lifeisgreat20009 | last post by:
I am getting the following error :- 1>------ Build started: Project: Polygon Drawer, Configuration: Debug Win32 ------ 1>Compiling... 1>Dialog.cpp 1>g:\my subjects\3rd semester\project...
6
by: JR | last post by:
The code below compiles and runs perfectly in Windows XP Pro, Using MS VS 2005. If I compile with g++ (cygwin) using the following command line: g++ -pedantic -Weffc++ -Wall -Wctor-dtor-privacy ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.