Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build this on Windows 10 #1

Open
baristar opened this issue Feb 25, 2020 · 3 comments
Open

How to build this on Windows 10 #1

baristar opened this issue Feb 25, 2020 · 3 comments
Labels
help wanted Extra attention is needed windows Windows OS Related

Comments

@baristar
Copy link

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
Copy link
Owner

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
Copy link
Owner

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.

@markuman markuman added help wanted Extra attention is needed windows Windows OS Related labels Feb 25, 2020
@baristar
Copy link
Author

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

  • C & C++ Connectors
  • cmake
  • c compiler (WinGW-w64 for 32 and 64 bit Windows)
    I tried, then, in Octave (latest version as of today)
  • mkoctfile --mex -I"C:/Program Files/MariaDB/MariaDB Connector C 64-bit/include" -lmysqlclient -lz -lm -ldl -lssl -lcrypto mariadb.c

I got the following errors

  • cannot find -lmysqlclient
  • cannot find -dl
  • cannot find -lssl
  • cannot find -lcrypto

I will try some more to get over.
Joohwa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed windows Windows OS Related
Projects
None yet
Development

No branches or pull requests

2 participants