error compiling stl samples with g++ in cygwin

Discussion in 'C++' started by TheOne, May 2, 2007.

  1. TheOne

    TheOne Guest

    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.
    TheOne, May 2, 2007
    #1
    1. Advertising

  2. TheOne

    red floyd Guest

    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.
    red floyd, May 2, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TuPLaD
    Replies:
    22
    Views:
    1,109
    Will Twentyman
    Aug 30, 2004
  2. Replies:
    0
    Views:
    412
  3. Replies:
    0
    Views:
    416
  4. WELCOME to

    , Sep 3, 2003, in forum: Python
    Replies:
    1
    Views:
    501
    Robin Becker
    Sep 5, 2003
  5. Replies:
    0
    Views:
    400
Loading...

Share This Page