in reply to Re^5: inline in a perl module
in thread inline in a perl module
For me, I get the following fatal errors:use strict; use warnings; use Inline CPP => <<'EOC'; #include "main.h" int CCC; char GlobalArr[13] = {'G','l','o','b','a','l',' ','a','r','r','a',' +y','\0'}; MyClass myGlobalInstance(GlobalArr) ; int add(int x, int y) { char arr[7]={'i','n',' ','a','d','d','\0'}; MyClass mc(arr); myGlobalInstance.wow(); return x + y; } EOC print add(7, 5);
But then I don't have 'main.h' so at least some of those failures are not surprising.try_pl_13b2.xs:15:18: main.h: No such file or directory try_pl_13b2.xs:18: error: `MyClass' does not name a type try_pl_13b2.xs: In function `int add(int, int)': try_pl_13b2.xs:22: error: `MyClass' was not declared in this scope try_pl_13b2.xs:22: error: expected `;' before "mc" try_pl_13b2.xs:23: error: `myGlobalInstance' was not declared in this +scope dmake: Error code 129, while making 'try_pl_13b2.o'
Did you mean:use Inline CPP => Config => INC => '-l/users/nirf/perlTrials/inlineExa +mple';
Cheers,use Inline CPP => Config => INC => '-I/users/nirf/perlTrials/inlineExa +mple';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: inline in a perl module
by nirf1 (Novice) on May 19, 2008 at 10:07 UTC | |
by syphilis (Archbishop) on May 20, 2008 at 09:12 UTC | |
by nirf1 (Novice) on May 20, 2008 at 11:53 UTC |