With all due respect the question was not related to cl.exe or using Microsoft Visual Studio tools it was about compiling an exe with a perl interpreter embedded with the Borland C++ Free Command Line tools. It may work with cl.exe but not all of us have access to Visual Studio.
In order to help I went and downloaded Perl 5.8.5 stable.tar.gz and compiled it with the Borland C++ Free Command Line tools with the help of the documentation in README.win32. That was mostly ok except the reliance on rcl.exe was not mentioned in README.win32 as far as I can tell. This tool can be obtained in the MS Platform SDK and seems to be in Visual Studio.NET and Microsoft VB 6 (98)
When I went to compile the authors code I still had problems. Even making sure that I checked the build options with
C:\>perl -MExtUtils::Embed -e ccopts -e ldopts
-tWD -L"c:\perl\lib\CORE" -L"C:\borland\bcc55\lib" -Gn C:\perl\lib\
+CORE\perl5
8.lib C:\borland\bcc55\lib\import32.lib C:\borland\bcc55\lib\cw32mti.l
+ib
-O2 -D_RTLDLL -DWIN32 -DHAVE_DES_FCRYPT -D_MT -D__USELOCALES__ -D_WIN
+32_WINNT=0
x0410 -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -I"C:\perl\lib\CORE
+"
C:\>
Now the -Gn option gives an error so I removed that but I get the following still when I compile
C:\>bcc32 -tWD -Ic:\perl\lib\core -L"c:\perl\lib\CORE" -L"C:\borland
+\bcc55\lib
" C:\perl\lib\CORE\perl58.lib C:\borland\bcc55\lib\import32.lib C:\bo
+rland\bcc5
5\lib\cw32mti.lib perl_inc.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
perl_inc.c:
Error E2303 c:\perl\lib\core\win32.h 312: Type name expected
Error E2293 c:\perl\lib\core\win32.h 411: ) expected
Error E2293 c:\perl\lib\core\perlio.h 105: ) expected
Error E2293 c:\perl\lib\core\perlio.h 106: ) expected
Error E2293 c:\perl\lib\core\perlio.h 108: ) expected
Error E2293 c:\perl\lib\core\perlio.h 110: ) expected
Error E2141 c:\perl\lib\core\perlio.h 111: Declaration syntax error
Error E2293 c:\perl\lib\core\perlio.h 112: ) expected
Error E2293 c:\perl\lib\core\perlio.h 214: ) expected
Error E2293 c:\perl\lib\core\perlio.h 227: ) expected
Error E2303 c:\perl\lib\core\perlio.h 339: Type name expected
Error E2303 c:\perl\lib\core\perlio.h 342: Type name expected
Error E2293 c:\perl\lib\core\perlio.h 345: ) expected
Error E2293 c:\perl\lib\core\perlio.h 354: ) expected
Error E2293 c:\perl\lib\core\perlio.h 358: ) expected
Error E2293 c:\perl\lib\core\perlio.h 365: ) expected
Error E2293 c:\perl\lib\core\perlio.h 370: ) expected
Error E2303 c:\perl\lib\core\win32iop.h 73: Type name expected
Error E2303 c:\perl\lib\core\win32iop.h 74: Type name expected
Error E2303 c:\perl\lib\core\win32iop.h 77: Type name expected
Error E2303 c:\perl\lib\core\win32iop.h 133: Type name expected
Error E2238 c:\perl\lib\core\perl.h 1775: Multiple declaration for 'AV
+'
Warning W8017 c:\perl\lib\core\dosish.h 142: Redefinition of 'Stat' is
+ not identical
Error E2257 c:\perl\lib\core\perl.h 2074: , expected
Error E2257 c:\perl\lib\core\perl.h 2075: , expected
Error E2257 c:\perl\lib\core\perl.h 2076: , expected
Error E2228 c:\perl\lib\core\perl.h 2076: Too many error or warning me
+ssages
*** 26 errors in Compile ***
Now I am tired but I cursory look into 'c:\perl\lib\core\win32.h' didn't reveal anything blatantly erroneous but I could be wrong. I also know that the authors code should work because you have tested it with Visual Studio and I
tested it on FreeBSD 4.8-STABLE with perl 5.8.3. So maybe there is breakage in building with Borland bcc32.exe? I beleive bcc32.exe is a compiler that "is supported" for building perl. You will note however that the errors that I get are very similar if not the same as what Nalina was getting |