Click here to get back home

Calling C++ / MFC / SDKs usinf Inline

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Calling C++ / MFC / SDKs usinf Inline Sankaran 07-16-2005
Posted by Sankaran on July 16, 2005, 12:36 am
Please log in for more thread options


Hello

I have written the following program
-----------------------------------------------------------------
use Inline C => DATA =>
LIBS =>
'-lE:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\clregistrywrapper';

$text = "@ARGV" || 'Inline.pm works with MSWin32. Scary...';

WinBox('Inline Text Box', $text);

__END__
__C__

#include
"E:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\CLRegistry.h"

int WinBox(char* Caption, char* Text)
{
         const CString& entryName =
"HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat
Reader.0\AdobeViewer\EULA";
         DWORD                dwValue                = 0.0;
         const CString        subKey                = _T("");
BOOL bRead = ReadFromRegistry(entryName,dwValue,subKey);
if (TRUE == bRead)
{
                 printf("Successful Registry Read \n");
                 printf ("Dword Value: %f", dwValue);
                 }
                 else
                 {
                         printf("Successful Registry Read");
                         }
        return 0;
}
----------------------------------------------------------------
This is to read a particular registry entry from my machine. and I am
getting the following error
------------------------------------------------------------------
Hello2_pl_3b3e.c
C:\PROGRA~1\MICROS~3\VC98\MFC\INCLUDE\afx.h(15) : fatal error C1189:
#error : M
FC requires C++ compilation (use a .cpp suffix)
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

A problem was encountered while attempting to compile and install your
Inline
C code. The command that failed was:
nmake > out.make 2>&1

The build directory was:
E:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\_Inline\build\Hello2_p
l_3b3e

To debug the problem, cd to the build directory, and inspect the output
files.

at Hello2.pl line 0
INIT failed--call queue aborted.
-----------------------------------------------------------------
I have installed Inline:C module only. To compile this do I require any
other modules (Inline:CPP)? From where can I get this??

Regards,
Sankaran



Posted by Sisyphus on July 16, 2005, 5:53 pm
Please log in for more thread options



> Hello
>
> I have written the following program
> -----------------------------------------------------------------
> use Inline C => DATA =>
> LIBS =>
>
'-lE:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\clregistrywrapp
er';
>
> $text = "@ARGV" || 'Inline.pm works with MSWin32. Scary...';
>
> WinBox('Inline Text Box', $text);
>
> __END__
> __C__
>
> #include
> "E:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\CLRegistry.h"
>
> int WinBox(char* Caption, char* Text)
> {
> const CString& entryName =
> "HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat
> Reader.0\AdobeViewer\EULA";
> DWORD dwValue = 0.0;
> const CString subKey = _T("");
> BOOL bRead = ReadFromRegistry(entryName,dwValue,subKey);
> if (TRUE == bRead)
> {
> printf("Successful Registry Read \n");
> printf ("Dword Value: %f", dwValue);
> }
> else
> {
> printf("Successful Registry Read");
> }
> return 0;
> }
> ----------------------------------------------------------------
> This is to read a particular registry entry from my machine. and I am
> getting the following error
> ------------------------------------------------------------------
> Hello2_pl_3b3e.c
> C:\PROGRA~1\MICROS~3\VC98\MFC\INCLUDE\afx.h(15) : fatal error C1189:
> #error : M
> FC requires C++ compilation (use a .cpp suffix)
> NMAKE : fatal error U1077: 'cl' : return code '0x2'
> Stop.
>
> A problem was encountered while attempting to compile and install your
> Inline
> C code. The command that failed was:
> nmake > out.make 2>&1
>
> The build directory was:
>
E:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\_Inline\build\Hell
o2_p
> l_3b3e
>
> To debug the problem, cd to the build directory, and inspect the output
> files.
>
> at Hello2.pl line 0
> INIT failed--call queue aborted.
> -----------------------------------------------------------------
> I have installed Inline:C module only. To compile this do I require any
> other modules (Inline:CPP)? From where can I get this??
>

Yes - try using Inline::CPP instead of Inline::C. Get it from:
http://search.cpan.org/~neilw/Inline-CPP-0.25/

Cheers,
Rob




Similar ThreadsPosted
Calling external dll from inline perl using gcc on XP May 19, 2006, 2:48 am
Calling External DLL functions in Perl using Inline July 11, 2005, 6:47 am
Q: ActivePerl - calling an ActiveX object August 1, 2006, 9:22 pm
calling methods on deserialized objects August 25, 2006, 4:32 pm
How do I keep subroutines Local to the libraries I am calling? October 16, 2006, 11:05 am
trickiness (?) calling regular subroutines from OO methods August 23, 2004, 11:16 am
Error calling Win32::Printer from a perl script hosted in IIS on Win2k3 June 3, 2008, 8:53 am
Error calling Win32::Printer from a perl script hosted in IIS on Win2k3 June 3, 2008, 8:57 am
Inline::Tcl vs. Inline::Tcl August 23, 2006, 12:09 pm
Using a .SO library with Inline January 28, 2005, 12:55 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap