This is a great site for Perl information. I wished I would have found it a couple of years ago. At any rate I have a question about building C programs that imbed Perl. The web page has a wealth of information. BUT it is a little Unix oriented... Not that I have anything against Unix (I would rather use it) but I'm on a WinNT development platform. Using Active Perl for WinNT. The current compiler I'm using is DJGPP (WinNT implementation of gcc compiler) and I am trying to build the interpet.c program in the examples. I get the following error:
D:\devsoft\ccode\c>gcc -o interp.exe d:/devsoft/ccode/c/interp.c --ve +rbose -lm -I d:/devsoft/perl /lib/CORE Reading specs from d:/djgpp/lib/gcc-lib/djgpp/2.952/specs gcc version 2.95.2 19991024 (release) d:/djgpp/lib/gcc-lib/djgpp/2.952/cpp.exe -lang-c -v -I d:/devsoft/per +l/lib/CORE -D__GNUC__=2 -D__GN UC_MINOR__=95 -Dunix -Di386 -DGO32 -DDJGPP=2 -DMSDOS -D__unix__ -D__i3 +86__ -D__GO32__ -D__DJGPP__=2 -D__MSDOS__ -D__unix -D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asystem( +unix) -Asystem(msdos) -Acpu(i3 86) -Amachine(i386) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i3 +86__ -D__tune_pentium__ -imacr os d:/djgpp/lib/../include/sys/version.h -remap d:/devsoft/ccode/c/int +erp.c d:/djgpp/tmp\cc8Kbifp.i GNU CPP version 2.95.2 19991024 (release) (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: d:/devsoft/perl/lib/CORE d:/djgpp/include d:/djgpp/lib/gcc-lib/djgpp/2.952/include d:/djgpp/include End of search list. The following default directories have been omitted from the search pa +th: $DJDIR/lang/cxx $DJDIR/lib/gcc-lib/djgpp/2.952/../../../../djgpp/include End of omitted list. In file included from d:/devsoft/ccode/c/interp.c:12: d:/devsoft/perl/lib/CORE/perl.h:3317: patchlevel.h: No such file or di +rectory (ENOENT)
From what I see the patchlevel.h file does exist in the perl/lib/CORE path. I know that DJGPP since it is DOS based has strict requirements on long filenames. Anyone ever tried this?? Would it be better to try compilation using M$ Visual C++??

Any help would be greatly appreciated.

RobT


In reply to Embedding Perl in C Programs by RobT

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.