oct file not found

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

oct file not found

Octave - Maintainers mailing list
I had successfully compiled and used the octave interface for the caffe
machine learning framework. The interface mainly consists of a file
caffe_.oct, which I am still able to build without errors.

But somehow after rebuilding today, from within octave the function is not
found anymore:

octave> exist("caffe_")
ans = 3
octave> caffe_("version")
error: 'caffe_' undefined near line 1, column 1

Since I am not a C++ expert I am totally lost. Any help is GREATLY
appreciated.

The correspoding caffe_.cpp file can be found here:
https://github.com/BVLC/caffe/blob/master/matlab/%2Bcaffe/private/caffe_.cpp




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: oct file not found

Octave - Maintainers mailing list
hmm, my name appears as "octave-maintainers"  in Nabble. Probably because I
didn't sign my message.

Sorry,

Muhali




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: oct file not found

apjanke-floss
In reply to this post by Octave - Maintainers mailing list


On 3/16/21 1:34 PM, Muhali via Discussion List for GNU Octave
Maintainers wrote:

> I had successfully compiled and used the octave interface for the caffe
> machine learning framework. The interface mainly consists of a file
> caffe_.oct, which I am still able to build without errors.
>
> But somehow after rebuilding today, from within octave the function is not
> found anymore:
>
> octave> exist("caffe_")
> ans = 3
> octave> caffe_("version")
> error: 'caffe_' undefined near line 1, column 1
>
> Since I am not a C++ expert I am totally lost. Any help is GREATLY
> appreciated.
>
> The correspoding caffe_.cpp file can be found here:
> https://github.com/BVLC/caffe/blob/master/matlab/%2Bcaffe/private/caffe_.cpp

That file looks like a MEX function, not an OCT-file, to me. Have you
tried compiling it with the mex() command instead of the
OCT-file-compiling command?

What's probably happening is that you're compiling it as an OCT-file,
but it doesn't actually export OCT-file structures (because it's
structured as a MEX file instead), so when Octave tries to load it up
and call it as an OCT-file function, it gets a linkage error (and
produces a not-very-helpful error message).

Cheers,
Andrew