Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I found this thread much later and think I might have something to add.

I got similar output:
Expat.obj : error LNK2001: unresolved external symbol __imp_XML_SetEnd +DoctypeDeclHandler Expat.obj : error LNK2001: unresolved external symbol __imp_XML_GetBas +e Expat.obj : error LNK2001: unresolved external symbol __imp_XML_SetEle +mentDeclHandler Expat.obj : error LNK2001: unresolved external symbol __imp_XML_Defaul +tCurrent Expat.obj : error LNK2001: unresolved external symbol __imp_XML_SetSta +rtCdataSectionHandler ...
When I searched for one of the symbol in the libexpat.lib file, I found something interesting.
$ grep _imp__XML_SetCommentHandler libexpat.lib Binary file libexpat.lib matches $ grep __imp_XML_SetCommentHandler libexpat.lib Exit 1
The short of it is that the symbol name is not correct. I think the toolchain (gcc, other VC version) used to build libexpat.lib was different from the toolchain that I am using to build XML::Parser::Expat and that is why the link is failing.

I have a theory on what is actually happening, but it is only a theory, so take it for what it is...
  • The libexpat.lib contains a XML_SetCommentHandler function that knows how to load the libexpat.dll and then call a differently named version of the function that resides in the DLL. This naming is the root problem.
  • When the libexpat.lib was compiled, the prototype of the DLL version of the function had extern "c", and some "declspec" keyword, added to the name. The use of extern "c" prepends a "_" to the symbol name. The use of "declspec" prepends a "_imp_" to the symbol name.
  • When the toolchain used to build libexpat.dll built the function, it honored the order of the extern "c" and "declspec" differently than the toolchain that I am using to build/link the libexpat.lib.

    In reply to Re: XMl-Parser build failed on windows X64 with VStuido10 by mfort
    in thread XMl-Parser build failed on windows X64 with VStuido10 by pthiru

    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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (7)
    As of 2019-04-25 19:44 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      I am most likely to install a new module from CPAN if:
















      Results (127 votes). Check out past polls.

      Notices?
      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!