octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47713] the function in a mex file turns out u


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #47713] the function in a mex file turns out undefined when all the letters of the file's name are capital
Date: Sun, 17 Apr 2016 12:18:55 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38

Follow-up Comment #3, bug #47713 (project octave):

With Octave-4.0.1 from ftp.gnu.org I get:

:
Octave was configured for "i686-w64-mingw32".
:
>> cd c:/tmp
>> mkoctfile --mex PANDA_SF_2_HF.c
>> PANDA_SF_2_HF
Hello, World!
I have 0 inputs and 0 outputs


...so that works fine AFAICS.

Let's dig further. What is the exact error message you get?


Anyway I suspect you are a bit confused about case-sensitivity nitty-gritty,
and about file names and function names in a file.

On Windows, the entire file system is case-insensitive and AFAIK even
MinGW/MSYS cannot get around that.
But OTOH Octave's _namespace_ *IS* case-sensitive. The only way I can get an
error is when I call the just-compiled PANDA_SF_2_HF module with:

>> PANDA_SF_2_Hf
error: 'PANDA_SF_2_Hf' undefined near line 1 column 1


What happens is that Octave puts an identifier for Octave's namespace in the
module and Octave's parser expects the case of *that* identifier to match the
function call exactly, no matter what the file name looks like.

You might try with:
+ verbatim+
>> autoload ("PANDA_SF_2_Hf", which ("PANDA_SF_2_HF"))
>> PANDA_SF_2_Hf
Hello, World!
I have 0 inputs and 0 outputs


(Hey! now it does work)
(FYI, autoload() instructs Octave to load some function called "foo"
(case-sensitive !) from some file called e.g., "bar". See help autoload)

All in all I think you simply mixed up case somewhere.

I'm tempted to close this report with "Works for me", but I'll await your
response for a while.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47713>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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