brechtsanders / xlsxio

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

Procedure entry point xlsxiowrite_* could not be located in the dll #38

Closed Chris-SG closed 5 years ago

Chris-SG commented 5 years ago

Seems all exports from xlsxiowrite result in this same error. Tried x86 / x64 and various versions of each.

Full error is: The procedure entry point xlsxiowrite_* could not be located in the dynamic link library C:\path\to\exe\app.exe

I believe everything is linked fine, xlsxio_read works fine. Any ideas what may cause this? depends seems to show that the exports are there.

brechtsanders commented 5 years ago

On which platform was this using which compiler? Also I find it strange the error mentions the .exe as a dynamic link library, while it is an executable. Which .a file did you link with exactly? If you are using Visual C you probably need a .lib file. There are ways to make a .lib file from a .dll file (I'm sure you can find it if you google it).

Chris-SG commented 5 years ago

Building on win10 x64 with msvc2017. Linking with xlsxio_write.dll.a and read.dll.a

.lib is also added as additional libraries using the ones provided in the windows prebuilt binaries. Maybe I’ll try generating a new one next time I am at my computer if that is possible.

brechtsanders commented 5 years ago

I'm not sure MinGW-generated .a files will work with Visual C... You really should create a .lib file from the DLL and link with that.

Chris-SG commented 5 years ago

Generating the .lib files seems to have worked, thanks for the suggestion!