in reply to Embedding perl in C

The first two errors show that your cc can not find the include files of perl, "EXTERN.h", "perl.h". As reneeb has pointed out, you find where these are installed by running perl -MExtUtils::Embed -e ccopts, which, on my system, shows

-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/us +r/lib/perl5/5.8.2/i686-linux/CORE
you have to pass the -I option to the cc so that it knows where to find the includes.

As for the next three errors, they seem to result from the misssing includes.

Replies are listed 'Best First'.
Re^2: Embedding perl in C
by Nalina (Monk) on Aug 23, 2004 at 11:05 UTC
    Thanks,

    I got all the include files. Still when I tried to compile, I got an error
    Error D:\TC\INCLUDE\LOCALE.H 22: Error directive: ERROR: Only Win32 t +arget supported!
    I am working on windows 2000 system. How do I resolve this error?

      This is only a guess but you should probably get a newer or different c compiler. Did you compile perl with that compiler? You'd better use the same compiler (or a very similar one) and the same c library (but that comes with borland C) to compile perl and to compile this program, or you'll have compatibility problems.

        Borland's free compiler is rather good. It's the same one that ships with their Builder product. It probably doesn't have the power of gcc + gdb, but on for native win32 compilers, especially that are free, I would say its rather good.