xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
Is there a way to use perl type(SV, AV, HV) without perl interpreter? I mean don't invoke perl interpreter or struct. I tried to build a dll with a func roughly like below, but complain "error C2065: 'my_perl' : undeclared identifier":Thanks in advance!!!!#include "windows.h" #include <stdio.h> #include <tchar.h> #include "perl.h" #include "EXTERN.h" SV* Utl_Stats() { HV* infoHV = newHV(); SV* info = newSV(0); hv_store(infoHV, "name1", 5, newSVnv(1), 0); hv_store(infoHV, "name2", 5, newSVnv(2), 0); hv_store(infoHV, "name3", 5, newSVnv(3), 0); sv_setsv(info, sv_2mortal(newRV_noinc((SV*) infoHV))); return info; }
I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use perl type without perl
by zwon (Abbot) on Sep 25, 2012 at 12:25 UTC | |
|
Re: Use perl type without perl
by rurban (Scribe) on Sep 25, 2012 at 13:06 UTC | |
by xiaoyafeng (Deacon) on Sep 25, 2012 at 13:26 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2012 at 13:39 UTC | |
by bulk88 (Priest) on Sep 25, 2012 at 17:13 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2012 at 17:20 UTC | |
| |
|
Re: Use perl type without perl
by bulk88 (Priest) on Sep 25, 2012 at 17:37 UTC |