SOLVED!
Have a nice time perl monks! I have windows 7 HP 64bit and professional visual studio 2013. I want to call perl sub from c code. I looked at perlembed, found out that strawberry perl does not have perl520.lib, as it seems to be build with mingw. So I've tried to build perl myself. I've got sources and opened perl-5.20.2/win32/Makefile. I've uncommented:
I run Developer command prompt for VS2013. nmake seems to run fine. Then fun starts. nmake test hangs on perl_mb_opt 1/8. nmake install copies 809 files, but seems to fail to locate many modules, because it says(it is my translation, because my nmake is not english:( ): 'cannot locate or found any substitution for module *module name*'. Then when I try to compile the easiest example from perlembed
#include <EXTERN.h> /* from the Perl distribution */ #include <perl.h> /* from the Perl distribution */ static PerlInterpreter *my_perl; /*** The Perl interpreter ***/ int main ( int argc, char **argv, char **env ) { PERL_SYS_INIT3 ( &argc, &argv, &env ); my_perl = perl_alloc ( ); perl_construct ( my_perl ); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; perl_parse ( my_perl, NULL, argc, argv, ( char ** ) NULL ); perl_run ( my_perl ); perl_destruct ( my_perl ); perl_free ( my_perl ); PERL_SYS_TERM ( ); }
It fails to start with exception 0xc000007b. I tried everything I could think of: changes in makefile, launching console as administrator. Nothing seems to work at all. I'm confused. Please, help me somehow. Thank you.
EDIT
The most common problem which causes 0xc000007b exception is architicture discrepancy. But perl -v shows me MSWin32-x86 and my application also is built under win32 option.
/EDIT
SOLUTION

I'm complete moron.

I've launched "Developer Command Prompt for VS2013". Instead you should launch architecture dependant version of prompt like VS2013 x64 Native Tools Command Prompt It transforms error 0xc000007b to 'dll not found'


/SOLUTION

In reply to Compiling perl on windows with visual studio by DrMoisha

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.