brechtsanders / xlsxio

XLSX I/O - C library for reading and writing .xlsx files
MIT License
397 stars 113 forks source link

Can't use the library after following all the instalation procedure #81

Open PETROSCHOOL opened 3 years ago

PETROSCHOOL commented 3 years ago

Hello

I have installed the library and all the dependencies mentioned on my MacPro (expat and libzip). I am trying to do a simple test

#include <stdio.h>
#include "xlsxio_read.h"

int main(void){
    const char* filename = "WELL_DATA.xlsx";
    xlsxioreader xlsxioread;
    xlsxioread = xlsxioread_open(filename);
    if ((xlsxioread = xlsxioread_open(filename)) == NULL) {
        fprintf(stderr, "Error opening .xlsx file\n");
        return 1;
    }
    return 0;
}

and compile it this way: gcc file_name.c -o output

And I get the following message:

Undefined symbols for architecture x86_64: "_xlsxioread_open", referenced from: _main in test-383c3d.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I hope anyone can help me with this. Thx in advance