Calling C++ / MFC / SDKs usinf Inline

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Calling C++ / MFC / SDKs usinf Inline

    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\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\_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

    Sankaran Guest

  2. Similar Questions and Discussions

    1. Calling external dll from inline perl using gcc on XP
      Hi I'm trying call an external dll from inline using the below perl code. use warnings; use Inline C => Config => MYEXTLIB =>...
    2. ANNOUNCE: Inline::WSC V0.01
      Inline::WSC allows Perl to call JavaScript and VBScript methods, passing parameters and retrieving return values. Inline::WSC is Win32-only. ...
    3. Calling External DLL functions in Perl using Inline
      Hello I am trying to call a DLL function from Perl using Inline as follows use Inline C => DATA => LIBS => '-lInlinetestLib'; greet(); ...
    4. [PHP-DEV] [PATCH] inline -> static inline
      On Fri, 15 Aug 2003, Jason Greene wrote: Thanks, I have applied the patch. The CVS reorg did not affect karma assignment. - Sascha
    5. Download earlier SDKs?
      Are the SDKs for versions of PS prior to 7.x available for download? Thanks.
  3. #2

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


    "Sankaran" <psankarv@yahoo.com> wrote in message
    news:1121499378.909012.21100@g44g2000cwa.googlegro ups.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\CLRegistry.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\_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:
    [url]http://search.cpan.org/~neilw/Inline-CPP-0.25/[/url]

    Cheers,
    Rob


    Sisyphus Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139