nim-cppstl icon indicating copy to clipboard operation
nim-cppstl copied to clipboard

Error: static assertion failed

Open rubgithub opened this issue 2 years ago • 1 comments

Hi there, I'm getting multiples errors while compiling a dll

my ffi.nim files only contains an import:

import cppstl/std_string

compile:

nim c --cpu:i386 -d:release --app:lib --nomain ffi.nim

D:\nim\lib/nimbase.h:550:30: error: static assertion failed 550 | NIM_STATIC_ASSERT(sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8, ""); D:\nim\lib/nimbase.h:278:50: note: in definition of macro 'NIM_STATIC_ASSERT' 278 | #define NIM_STATIC_ASSERT(x, msg) static_assert((x), msg) |

Nim Compiler Version 1.6.6 [Windows: i386]

rubgithub avatar Aug 15 '22 21:08 rubgithub

Hello,

So for starter you need to use cpp backend of Nim compiler so the compiler command should be :

nim cpp ...

I also haven't tested this package on Windows as I do not own a Windows machine at the moment.

Clonkk avatar Aug 16 '22 08:08 Clonkk