markuman / mex-mariadb

MariaDB Client for GNU Octave (maybe this is compatible for MySQL and Matlab too)
MIT License
2 stars 0 forks source link

How to build this on Windows 10 #1

Open baristar opened 4 years ago

baristar commented 4 years ago

Hello! The guideline provided here seems to work on Linux (or Ubuntu). I tried to connect maria-db from Octave on Windows 10. Is it possible to build mex files for Octave on Windows 10? Thanks Joohwa Lee

markuman commented 4 years ago

In general, it should be possible. See: https://mariadb.com/kb/en/compiling-connectorc/

You need cmake and a C compiler.

AdHoc I've no Windows available. But I try to test it in the cloud. But be aware, I've no windows experiences at all.

markuman commented 4 years ago

Basically you need to install the Mariadb C/C++ Connector library and do from octave

 mkoctfile --mex -I"C:/Program Files/MariaDB/MariaDB Connector C 64-bit/include" -lmysqlclient -lz -lm -ldl -lssl -lcrypto mariadb.c

But this results in some mingw32 errors.

I've absolutely no idea about windows.
I highly recommend to use the WSL and run octave from there. From that point it should be easy to use mex-mariadb.

Another try is mingw. Start with mingw-get https://osdn.net/projects/mingw/releases/p15522
and install from there all necessary build dependencies (gcc, openssl (bin + lib)).
Then you can try to compile mex-mariadb from shell using gcc.exe.
The Makefile https://github.com/markuman/mex-mariadb/blob/master/Makefile offers some examples how to compilate directly with gcc.

But again - I've absolutely no idea about windows.

baristar commented 4 years ago

Thank you markuman for your kind guide. I spent several days to get ideas. I installed the following:

I got the following errors

I will try some more to get over. Joohwa