The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: mex - matlab calls fortran which calls matlab which calls fortran - is it possible?
Replies: 12   Last Post: Oct 15, 2009 9:17 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Michele Catalano

Posts: 10
Registered: 10/2/09
Re: mex - matlab calls fortran which calls matlab which calls fortran - is it possible?
Posted: Oct 12, 2009 5:00 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear James,

I checked the doc but I do not meet particular recommendation. However I try to adjust the code without any results.

Could be the underscore appended the reason? The undefined symbol is actually
"engopen_" and not "engopen".

Finally when I compile the fengdemo.F demo file, I don't get any error. This is organized as a program main and not as mexfunction...

It seem's to me a compiler issue. Is it?

"James Tursa" <> wrote in message <hanm3q$lds$>...
> "Michele Catalano" <> wrote in message <han7ia$5bs$>...
> > Sorry just to observe that the file is not libeng.lib but
> >
> > However, I cannot run the mex file, i get always the above error

> Check your documentation for the *exact* case of the engopen etc calls. The MATLAB API for Fortran actually uses the pre-processor for these and translates them into the actual library name, but this *only* works if the case matches the pre-processor define exactly. Normally in Fortran case doesn't matter, but in this case it does. So maybe engOpen will work, or ENGOPEN, etc. Look at the exact case shown in your doc and make sure your Fortran source code uses that exact case.
> James Tursa

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.