I've just decided to try to learn how to work with perl XS. I am using VC++ 9.0 for Win32 (just downloaded). I'm using the example given by JamesNC in a previous post -- http://www.perlmonks.org/?node_id=510773 -- and have my own set of problems.

It appears that my compile ran okay, but the makefile is missing something that I need for the link to complete. I'm using the same source as JamesNC, I just named it 'simple.c', and I'm getting a link error message regarding the missing boot_simple symbol. That message is 5-6 lines from the bottom.

Can anyone see what is missing from the following nmake output (note that it was scraped off my screen)? Thanks.

D:\Perl\bin\perl.exe D:\Perl\lib\ExtUtils\xsubpp -typemap D:\ +Perl\lib\E xtUtils\typemap simple.xs > simple.xsc && D:\Perl\bin\perl.exe -MExtU +tils::Comm and -e mv simple.xsc simple.c Please specify prototyping behavior for simple.xs (see perlxs manual) cl -c -I. -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CO +NSOLE -DNO _STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB +_LAST_IN_I NC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSV +CRT_READFI X -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" " +-ID:\Perl\ lib\CORE" simple.c simple.c link -out:blib\arch\auto\simple\simple.dll -dll -nologo -nodef +aultlib -d ebug -opt:ref,icf -libpath:"D:\Perl\lib\CORE" -machine:x86 simple.ob +j D:\Per l\lib\CORE\perl58.lib oldnames.lib kernel32.lib user32.lib gdi32.lib w +inspool.li b comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netap +i32.lib uu id.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.l +ib msvcrt. lib -def:simple.def simple.def : error LNK2001: unresolved external symbol boot_simple simple.def : error LNK2001: unresolved external symbol boot_simple blib\arch\auto\simple\simple.lib : fatal error LNK1120: 2 unresolved e +xternals NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio +9.0\VC\BIN \link.EXE"' : return code '0x460' Stop.

In reply to VC++ and XS -- again by TomKane

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.