Thank @shashlick I will give it a try. But, my first approach was to use the c2nim and it works well.
But, when I import the library it gives the following error: /home/hdias/test/nghttp2/nghttp2.nim(29, 16) Error: invalid token: _ (\95)| ---|--- ## Define WIN32 when build target is Win32 API (borrowed from ## libcurl) when (defined(_WIN32) or defined(__WIN32__)) and not defined(WIN32): <<< line 29 const WIN32* = true ## Compatibility for non-Clang compilers when not defined(__has_declspec_attribute): template __has_declspec_attribute*(x: untyped): untyped = 0 when defined(_MSC_VER) and (_MSC_VER < 1800): ## MSVC < 2013 does not have inttypes.h because it is not C99 ## compliant. See compiler macros and version number in ## https://sourceforge.net/p/predef/wiki/Compilers/ else: when defined(NGHTTP2_STATICLIB): const NGHTTP2_EXTERN* = true elif defined(WIN32) or (__has_declspec_attribute(dllexport) and __has_declspec_attribute(dllimport)): when defined(BUILDING_NGHTTP2): const NGHTTP2_EXTERN* = __declspec(dllexport) else: const NGHTTP2_EXTERN* = __declspec(dllimport) else: when defined(BUILDING_NGHTTP2): const NGHTTP2_EXTERN* = __attribute__((visibility("default"))) else: const NGHTTP2_EXTERN* = true ## * Run Any idea how to fix this?