Hello,
I have a project which requires that I run a c-code inside a perl code. Inline module seems to be the perfect solution for me. Though, I have a problem that I haven't been able to solve by myself. Well I said to myself: "Let's start from the simplest case so that I can see if the module really works or not". So I created a pl file named dene.pl (after successfully installing the inline module) and put the following code into it:
#!C:\Perl\bin\perl.exe
use Inline C => <<'END_C';
void greet() {
printf("Hello, world!");
}
END_C
greet();
Now when I type "perl dene.pl", I get an error message which says: "msvcr90.dll could not be found, try to reinstall the app". I checked which c compiler perl is using and it turns out that it's using cl.exe which comes along with Microsoft Visual Studio ++. I have checked if I can successfully compile the c-code itself using cl.exe and the result is: Yes I can. However, no matter what I did, I couldn't get the perl code to run.
I really need help here urgently. Thanks in advance.
Note: I have the mentioned dll file many places which I think are the right places for the file to be (C:\Windows\winSxS\x86_Microsoft.VC90.CRT_1fc....\; C:\MSVC9\VC\redist\x86\Microsoft.VC90.CRT\ etc.)
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.