error compiling stl samples with g++ in cygwin

T

TheOne

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.
 
R

red floyd

TheOne said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top