Re: oct file not found

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

Re: oct file not found

mmuetzel
Am 16. März 2021 um 18:34 Uhr schrieb "Muhali via Discussion List for GNU Octave Maintainers":

> 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

Moving to the help mailing list.

caffe_.cpp doesn't look like the source for an .oct file. How did you build "caffe_.oct"?
What does `which("caffe_")` return for you?

Markus



Reply | Threaded
Open this post in threaded view
|

Re: oct file not found

Octave - General mailing list
from the maintainers list:


apjanke-floss wrote

> 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

That solved it. I had somehow forgotten about the --mex option and created
an oct-file.

Thanks a lot.

Muhali



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html