This is just an observation when x-compiling with NIM. I had a weird problem 
when x-compiling my crypto lib with MinGW. In particular I needed to import 
some Windows crypto provider stuff from <wincrypt.h> for compiling 
[https://github.com/mjfh/nim-crypto/blob/unstable/src/lib/ltc/getbytes.nim](https://github.com/mjfh/nim-crypto/blob/unstable/src/lib/ltc/getbytes.nim).
 See below for a minimalised NIM source causing the problem. # nim test file: 
problem.nim

# C file equivalent of: # #define WIN32_LEAN_AND_MEAN # #include <windows.h> # 
#include <wincrypt.h> # printf(">>> PROV_RSA_FULL=%dn", PROV_RSA_FULL);

{.passC: "-DWIN32_LEAN_AND_MEAN".}

var PROV_RSA_FULL {.importc,
    header: "<windows.h>", header: "<wincrypt.h>".}: int

echo ">>> PROV_RSA_FULL=", PROV_RSA_FULL On a native MinGW this just noisily 
fails which is OK. So I know that I have to do it the other way writing C code. 
The problem appeared on my Linux/amd64 when I initially compiled it for a Win32 
as shown below.

Reply via email to