Created
January 23, 2025 12:18
-
-
Save bulk88/c345d1debf1968e70e51931d5ed0430a to your computer and use it in GitHub Desktop.
cppinl.pl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Inline 'noclean'; | |
use Inline C => Config => | |
PRE_HEAD => '#define PERL_NO_GET_CONTEXT 1', | |
; | |
use Inline C => Config => BUILD_NOISY => 1; | |
use Inline C => <<'END_OF_C_CODE'; | |
typedef struct { | |
U32 ar [4]; | |
} SAV; | |
bool cpp2(char * savpv1, char * savpv2) { | |
dTHX; | |
void * vp1 = (void*)savpv1; | |
void * vp2 = (void*)savpv2; | |
if(vp1 > vp2) { | |
return TRUE; | |
} else { | |
return FALSE; | |
} | |
} | |
END_OF_C_CODE | |
sub runcpp1 {cpp2($_[0],$_[1]);} | |
print "ret ".runcpp1("\x00" x 32, "\x00" x 32); | |
################ | |
C:\sources\_Inline\build\cppinl_pl_f65b>cl -c -nologo -GF -W3 -MD -EHsc -std: | |
c++20 -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_N | |
ONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS -DPERL_TEXTMODE_SCRIPTS -D | |
MULTIPLICITY -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO -O1 -GL -fp:p | |
recise -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -Za /permissive- "-IC:\pb64\l | |
ib\CORE" -Fdcppinl_pl_f65b.pdb /Tp cppinl_pl_f65b.cpp | |
cppinl_pl_f65b.cpp | |
C:\Program Files (x86)\Windows Kits\10\\include\10.0.18362.0\\um\winnt.h(12723): | |
error C2467: illegal declaration of anonymous 'struct' | |
C:\Program Files (x86)\Windows Kits\10\\include\10.0.18362.0\\um\winnt.h(20801): | |
error C2133: '_IMAGE_POLICY_METADATA::Policies': unknown size | |
C:\Program Files (x86)\Windows Kits\10\\include\10.0.18362.0\\shared\ws2def.h(62 | |
5): error C2467: illegal declaration of anonymous 'struct' | |
C:\pb64\lib\CORE\inline.h(1148): warning C4804: '<=': unsafe use of type 'bool' | |
in operation | |
C:\pb64\lib\CORE\inline.h(1148): warning C4018: '<=': signed/unsigned mismatch | |
C:\sources\_Inline\build\cppinl_pl_f65b> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment