help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use mysql in octave with Windows


From: John Donnal
Subject: use mysql in octave with Windows
Date: Sat, 27 Jun 2020 14:47:29 +0100

Hi,

I have found a way to query a mysql database with octave by using https://github.com/markuman/mex-mariadb .
With octave 5.2.0 / Ubuntu, the mex file using mkoctfile compiles without issue and works well.

I try to make it work with Octave 5.2.0 / windows 10 64 bit and I have difficulties. 
I included the library OpenSSL-Win 64 using binaries from https://slproweb.com/products/Win32OpenSSL.html
I got mysqlclient.lib by installing MySQL Server 8.0 https://dev.mysql.com/downloads/c-api/
I built dlfcn-win32 using vcpkg https://github.com/dlfcn-win32/dlfcn-win32

I use:
mkoctfile --mex -L"\lib" -lmysqlclient -lpthread -lz -lm -ldl -llibssl -llibcrypto -I"\include" mariadb.c

I get many warnings: "corrupt .drectve at end of def file".
And many "undefined reference" like the small sample below.

lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$mn+0x6a): undefined reference to `__security_check_cookie'
1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$mn+0x12): undefined reference to `__chkstk'
lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$mn+0x3be): undefined reference to `__security_check_cookie'
lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$mn+0x1b): undefined reference to `__chkstk'
lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$mn+0x6c6): undefined reference to `??_M@YAXPEAX_K1P6AX0@Z@Z'
lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$mn+0xa41): undefined reference to `??_M@YAXPEAX_K1P6AX0@Z@Z'
lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$mn+0xa80): undefined reference to `__security_check_cookie'
lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-1585235943.36/release/mysys/mysys_objlib.dir/RelWithDebInfo/my_default.obj):(.text$x+0x23): undefined reference to `??_M@YAXPEAX_K1P6AX0@Z@Z'
lib/mysqlclient.lib(G:/ade/build/sb_0-38523192-

...

Did anybody compile successfully this mex file with Windows so that it can be used with octave?
Is there a better alternative to connect with Octave to a MySQL database with Windows? I can't find any Octave package supporting MySQL.

Thanks

 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]