Skip to content

Cannot use MGARD as a shared library due to misnamed function #5

@jpulidojr

Description

@jpulidojr

I'm trying to build a project against MGARD but it contains linker errors for the compressor. I found that there is a function declaration mismatch between mgard_capi.h and mgard_capi.cpp.

.cpp
extern "C" unsigned char *mgard_compress(int itype_flag, void *data, int &out_size, int nrow, int ncol, int nfib, void* tol_in)

vs

.h
extern unsigned char *mgard_compress(int itype_flag, void *data, int *out_size, int nrow, int ncol, int nfib, void* tol);

Also, removing the "C" portion in extern for both compress and decompress functions and correcting the function declarations to be consistent made it work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions