Clonkk / nim-cppstl

Nim Bindings for C++ STL stuff
https://clonkk.github.io/nim-cppstl/
MIT License
50 stars 9 forks source link

Error: static assertion failed #22

Open rubgithub opened 2 years ago

rubgithub commented 2 years ago

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]

Clonkk commented 2 years ago

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.