You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks, I its weird, I had to explicitly go to the directory of the mex file and only then did the function become available. Adding its directory via addpath(genpath('the/path')) did not work for some reason
I copied sqlite3.mex to ~/Documents/MATLAB/ but matlab still says Undefined function or variable 'sqlite3' so Matlab does not recognize .mex. Maybe sqlite3.mex is really is an .oct file, as mkoctfile creates identical files with and without --mex. If I rename it sqlite3.mexmaci64 it crashes matlab.
(2.) Windows and Linux binaries.
At matlab FEX site for sqlite3 you can download a zip with compiled_mex folder that has one linux binary, and all the rest are windows binaries:
862208 Apr 11 2018 sqlite3_matlab.exe
966706 Mar 3 2017 sqlite3_matlab.mexa64
741888 Mar 3 2017 sqlite3_matlab.mexw32
962560 Mar 3 2017 sqlite3_matlab.mexw64
29032 May 13 2018 sqlite3_octave_lnx_i686.mex
145052 May 13 2018 sqlite3_octave_win_64.mex
114247 May 13 2018 sqlite3_octave_win_i686.mex
The text was updated successfully, but these errors were encountered:
I don't know if you're still watching this thread, but I just published an update of my sqlite3 function (which adapts much of the C code of this project). You might be interested to give it a try. You can either use the same FEX link as in your post, or go directly to the release tag.
It contains C code that can be compiled with every compiler I managed to get to work with Matlab/Octave. I even got it to work on my Raspberry Pi. There is also a Mac binary, although I am not sure how many releases back it will work. You can check out the HTML documentation page to see the full test matrix.
Please add to readme info below.
(1.) Macos and linux HOWTO.
To create sqlite3.mex on macosx or linux.
brew install octave && git clone https://github.com/rmartinjak/mex-sqlite3.git
apt-get install liboctave-dev
mkoctfile --mex -lsqlite3 -loctave -o sqlite3.mex sqlite3.c structlist.c . && cp sqlite3.mex ~/octave/ && octave
GNU Octave, version 4.4.1
octave:1> sqlite3
error: sqlite3: usage: sqlite3(file, query[, params]
I tried putting sqlite3.mex in octave path, but only seems to find it if running from dir where it is. That is I have same problem in octave as does @chappjc in matlab per their comment at https://stackoverflow.com/questions/26189163/mex-compiled-function-not-recognized-by-matlab
I copied sqlite3.mex to ~/Documents/MATLAB/ but matlab still says
Undefined function or variable 'sqlite3'
so Matlab does not recognize .mex. Maybe sqlite3.mex is really is an .oct file, as mkoctfile creates identical files with and without --mex. If I rename it sqlite3.mexmaci64 it crashes matlab.(2.) Windows and Linux binaries.
At matlab FEX site for sqlite3 you can download a zip with compiled_mex folder that has one linux binary, and all the rest are windows binaries:
The text was updated successfully, but these errors were encountered: