Yet another "undefined reference to `_WinMain@16'" in cygwin

Discussion in 'Perl Misc' started by Sam Denton, Jun 28, 2003.

  1. Sam Denton

    Sam Denton Guest

    I'm getting this message when linking under Cygwin. I've googled the
    message text and found several of "voodoo" fixes (i.e. "This worked
    for me but I don't know why"). I've blindly tried several of them,
    but none of them worked.

    Yesterday, I installed the Gnu plotutils package, without apparent
    problems (once I found out to use "./configure --enable-libplotter").
    Now I'm trying to install the Perl Graphics::plotter module. The only
    fix that I haven't tried is to add a dummy WinMain function, but since
    I'm trying to create a .DLL, not a .EXE, I'm unsure of the
    ramifications. Is there a special flag that I don't know about?

    Here's the last bit of output from make (with the voodoo incantation
    "-Wl,-u,_WinMain@16" still included):

    Running Mkbootstrap for Graphics::plotter ()
    chmod 644 Plotter.bs
    rm -f blib/arch/auto/Graphics/Plotter/Plotter.dll
    LD_RUN_PATH="/usr/local/lib" g++ -s -L/usr/local/lib Plotter.o
    -Wl,-u,_WinMain@
    16 -o blib/arch/auto/Graphics/Plotter/Plotter.dll
    /usr/lib/perl5/5.8.0/cygwin-m
    ulti-64int/CORE/libperl.dll.a -L/usr/local/lib -lplotter
    /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../libcygwin.a(libcmain.o)(.text+0x7c)
    : undefined reference to `_WinMain@16'
    collect2: ld returned 1 exit status
    make: *** [blib/arch/auto/Graphics/Plotter/Plotter.dll] Error 1
     
    Sam Denton, Jun 28, 2003
    #1
    1. Advertising

  2. (Sam Denton) wrote in
    news::

    > I'm getting this message when linking under Cygwin. I've googled the
    > message text and found several of "voodoo" fixes (i.e. "This worked
    > for me but I don't know why"). I've blindly tried several of them,
    > but none of them worked.


    I do not _know_ the solution, but have you looked at

    http://cygwin.com/faq/faq_toc.html#TOC95

    and

    http://cygwin.com/cygwin-ug-net/dll.html

    I am only asking this because I do not see a `shared' flag anywhere, and it
    looks like, from the line

    > LD_RUN_PATH="/usr/local/lib" g++ -s -L/usr/local/lib Plotter.o


    you are stripping symbols. Again, I am no expert on cygwin, but those look
    like problem spots to me. Have you tried asking this question on the cygwin
    mailing list?

    Sinan.

    --
    A. Sinan Unur

    Remove dashes for address
    Spam bait: mailto:
     
    A. Sinan Unur, Jun 28, 2003
    #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. Replies:
    0
    Views:
    485
  2. Replies:
    0
    Views:
    438
  3. WELCOME to

    , Sep 3, 2003, in forum: Python
    Replies:
    1
    Views:
    528
    Robin Becker
    Sep 5, 2003
  4. Replies:
    0
    Views:
    419
  5. Berehem
    Replies:
    4
    Views:
    568
    Lawrence Kirby
    Apr 28, 2005
Loading...

Share This Page