I've written something with Inline which I'm happy with, and I'd like to try using SWIG. I've got strawberry 5.12, cygwin (without the perl distro), Windows 7, and the SWIG zip unzipped without anything else being done (no env vars set etc). Getting as far as the following took a fair bit of trial and error, but I'm now stuck with:

mimi@mimi-PC ~ $ export CYGWIN=nodosfilewarning mimi@mimi-PC ~ $ SRCS=C:/Users/mimi/swig/Examples/perl5/simple/example.c mimi@mimi-PC ~ $ OBJS=C:/Users/mimi/swig/Examples/perl5/simple/example.o mimi@mimi-PC ~ $ LIBPATH="-LC:/strawberry/perl/lib/CORE -LC:/strawberry/c/lib" mimi@mimi-PC ~ $ LIBS=-lperl512 mimi@mimi-PC ~ $ cd C:/Users/mimi/swig/Examples/perl5/simple mimi@mimi-PC /cygdrive/c/Users/mimi/swig/Examples/perl5/simple $ ../../../swig -perl5 example.i mimi@mimi-PC /cygdrive/c/Users/mimi/swig/Examples/perl5/simple $ gcc -c $SRCS mimi@mimi-PC /cygdrive/c/Users/mimi/swig/Examples/perl5/simple $ gcc -shared $OBJS $LIBPATH $LIBS -o example.dll mimi@mimi-PC /cygdrive/c/Users/mimi/swig/Examples/perl5/simple $ perl -Mexample Can't find 'boot_example' symbol in ./example.dll at example.pm line 11 Compilation failed in require. BEGIN failed--compilation aborted.

I have read this which is quite spare on exact detail that I can fathom.

So any help would be highly appreciated.


In reply to Building a SWIG example on cygwin by Just in

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.