Skip to content

Not compiling on windows #49

Open
Open
@Milerius

Description

@Milerius

Hello, this package doesn't seem's to compile on Windows:

CC: libzip_all
Error: execution of an external compiler program 'clang.exe -c  -w -DWIN32_LEAN_AND_MEAN -IC:\Users\roman\Documents\vcpkg/installed/x64-windows/include  -IC:\Users\roman\Desktop\nim-1.0.4\lib -IC:\Users\roman\CLionProjects\atomicDEX-QT\atomic_dex_desktop\tools -o C:\Users\roman\nimcache\dependencies_d\libzip_all.c.o C:\Users\roman\.nimble\pkgs\zip-0.2.1\zip\private\libzip_all.c' failed with exit code: 1

C:\Users\roman\.nimble\pkgs\zip-0.2.1\zip\private\libzip_all.c:193:17: error: function cannot return function type 'int (void *, void *, size_t, enum zip_source_cmd)' (aka 'int (void *, void *, unsigned long long, enum zip_source_cmd)')
typedef ssize_t (*zip_source_callback)(void *state, void *data,
                ^
C:\Users\roman\.nimble\pkgs\zip-0.2.1\zip\private\libzip_all.c:226:29: error: function cannot return function type 'ssize_t' (aka 'int (int *)')
ZIP_EXTERN ssize_t zip_fread(struct zip_file *, void *, size_t);
                            ^
C:\Users\roman\.nimble\pkgs\zip-0.2.1\zip\private\libzip_all.c:505:5: error: unknown type name 'zip_source_callback'
    zip_source_callback f;
    ^
C:\Users\roman\.nimble\pkgs\zip-0.2.1\zip\private\libzip_all.c:719:9: error: use of undeclared identifier 'pid_t'
        pid_t pid;
        ^
C:\Users\roman\.nimble\pkgs\zip-0.2.1\zip\private\libzip_all.c:727:9: error: use of undeclared identifier 'pid'
        pid = getpid();

Compiler: clang-9
Nim Compiler: 1.0.4
Windows 10.

Usage:

when defined(windows):
    {.passC: "-I"  & os.getEnv("VCPKG_ROOT") & "/installed/x64-windows/include"}
    {.passL: "-L"  & os.getEnv("VCPKG_ROOT") & "/installed/x64-windows-static/lib -lzlib -lz"}
import zip/zipfiles

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions