Calling C++ / MFC / SDKs usinf Inline

Calling C++ / MFC / SDKs usinf Inline

am 16.07.2005 09:36:18 von Sankaran

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\C LRegistry.h"

int WinBox(char* Caption, char* Text)
{
const CString& entryName =
"HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat
Reader\5.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\_I nline\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

Re: Calling C++ / MFC / SDKs usinf Inline

am 16.07.2005 09:53:51 von Sisyphus

"Sankaran" wrote in message
news:1121499378.909012.21100@g44g2000cwa.googlegroups.com...
> 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\C LRegistry.h"
>
> int WinBox(char* Caption, char* Text)
> {
> const CString& entryName =
> "HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat
> Reader\5.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\_I nline\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