Calling external dll from inline perl using gcc on XP

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

  1. #1

    Default 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 => "C:\\PerlProblem\\p6\\tst.dll",
    INC => "-IC:\\PerlProblem\\p6\\";

    BUILD_NOISY => 1;

    use Inline C => <<'EOC';

    #include "dllfct.h"

    void greet(){
    printf("test1\n");
    printf(add(5,6));
    printf("test2\n");
    }
    EOC
    greet();
    __END__

    I'm getting the following error when I run the perl file.

    C:\PerlProblem\test\p6>perl CallExternal.pl
    dmake.exe: makefile: line 849: Error -- Missing targets or
    attributes in rule

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

    The build directory was:
    C:\PerlProblem\test\p6\_Inline\build\CallExternal_ pl_20ad

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

    at CallExternal.pl line 9
    BEGIN failed--compilation aborted at CallExternal.pl line 18.

    Can someone please help me solve this? Thanks in advance.

    Manav

    agarwal.manav@gmail.com Guest

  2. Similar Questions and Discussions

    1. Getting Path of an external DLL in Perl: Inline C.
      Hello All, Subject: Getting Path of an external DLL in Perl: Inline C. I have a Perl program where I am using Inline:C module to call C++...
    2. 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(); ...
    3. Calling C++ / MFC / SDKs usinf Inline
      Hello I have written the following program ----------------------------------------------------------------- use Inline C => DATA => LIBS =>...
    4. Windows: Perl:Inline
      Hello All, I was trying to Use Inline, but getting lots of erros. Could you please help me by sending a good tutorial on this ?? I have done a...
    5. Inline-CPP and 64-bit perl compatibility?
      Are there any known issues surrounding the use of Inline::CPP with a perl executable compiled 64-bit? I am running Solaris. When I get to 'make...
  3. #2

    Default Re: Calling external dll from inline perl using gcc on XP


    <agarwal.manav@gmail.com> wrote in message
    news:1148021332.352994.161790@i40g2000cwc.googlegr oups.com...
    > Hi I'm trying call an external dll from inline using the below perl
    > code.
    >
    >
    > use warnings;
    >
    > use Inline C => Config =>
    > MYEXTLIB => "C:\\PerlProblem\\p6\\tst.dll",
    > INC => "-IC:\\PerlProblem\\p6\\";
    >
    > BUILD_NOISY => 1;
    >
    > use Inline C => <<'EOC';
    >
    > #include "dllfct.h"
    >
    > void greet(){
    > printf("test1\n");
    > printf(add(5,6));
    > printf("test2\n");
    > }
    > EOC
    > greet();
    > __END__
    >
    > I'm getting the following error when I run the perl file.
    >
    > C:\PerlProblem\test\p6>perl CallExternal.pl
    > dmake.exe: makefile: line 849: Error -- Missing targets or
    > attributes in rule
    >
    > A problem was encountered while attempting to compile and install your
    > Inline
    > C code. The command that failed was:
    > dmake > out.make 2>&1
    >
    > The build directory was:
    > C:\PerlProblem\test\p6\_Inline\build\CallExternal_ pl_20ad
    >
    > To debug the problem, cd to the build directory, and inspect the output
    > files.
    >
    > at CallExternal.pl line 9
    > BEGIN failed--compilation aborted at CallExternal.pl line 18.
    >
    > Can someone please help me solve this? Thanks in advance.
    >
    Not sure - I regularly use Inline::C with dmake and gcc (MinGW port) on
    Win32 and haven't struck any problem like this. (I've successfully linked to
    a dll using the same approach - though it's not something I do a lot.)

    Are you using the latest dmake from [url]http://search.cpan.org/dist/dmake/[/url] ?

    Does the problem go away if you don't try to link to the dll ?

    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