Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hanm3q$lds$1@fred.mathworks.com>...
> "Michele Catalano" <catamik@yahoo.it> wrote in message <han7ia$5bs$1@fred.mathworks.com>...
> > Sorry just to observe that the file is not libeng.lib but libeng.so
> >
> > 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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.