libxls / libxls

Read binary Excel files from C/C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I tried to build static library and dynamaic library for windows via MSYS2,but it's not working

abcdef123ghi opened this issue · comments

Hi Libxls
I tried to build a static library and dynamic library for Windows via MSYS2,but it doesn't work
my MSYS2 enviroment has everything required which are gcc g++ libiconv etc
I have read the install document and readme document as well,it's not working for me,but I just found the blog which really helped me,and I tried the below steps though
I tried the step belows
#1
CC='i686-w64-mingw32-gcc' ./configure --host=i686-w64-mingw32 --build=i686-w64-mingw32

#2
make & make install

everything worked fine here,there's no errors yet,I saw the libxlsreader.dll.a ,libxlsreader.la,libxlsreader.lai,libxlsreader-8.dll were generated
then I tried step 3
#3
ar x libxlsreader.dll.a

with this step I saw the .o files were generated, then I tried to build a dll file and def file
#4
i686-w64-mingw32-gcc -shared -o libxls.dll *.o -Wl,--export-all-symbols,--output-def,libxls.def -liconv
afterward it generated libxls.dll which was 94k and has only 2 functions as well
which were
_nm__brdb @1 DATA
_nm__xls_debug @2 DATA
these was not my unexpceted,cuz it'd should generated a file which has a bunch of functions which consume the libxlsreader-8.dll though,

I uploaded the file right here,the consequence files were in .libs folder though
https://drive.google.com/file/d/1zRyursEi3fECVkso-BPOagKa6u60BtDp/view?usp=sharing
any idea what wrong I have done?thank you so much

thanks for Brecht Sanders on Stackoverflow,he anwered my question and resolved my problem,I apperciate it
below was his answer,it works! hopefully Libxls gonna update their mingw portions in the install document file ,cuz it's NOT working anyway

install location (change as needed)

INSTALLPREFIX=/usr/local
wget https://github.com/libxls/libxls/releases/download/v1.6.1/libxls-1.6.1.tar.gz
tar xfz libxls-1.6.1.tar.gz
cd libxls-1.6.1
./configure --prefix=$INSTALLPREFIX --enable-static --enable-shared &&
make install-strip &&
echo SUCCESS