fortran 90 mex on Mac
Afficher commentaires plus anciens
I have some fortran 90 code and I have written a mex gateway function for it. Everything compiled and worked OK under Windows. Now I tried compiling on a mac and I run into some problems.
First hurdle was making mex work with the provided examples (yprimef.F). Thanks to some previous posts, after editing my mexopts.sh, I managed to compile and the example seems to work OK.
However, when I try to mex my .f90 files (which are in free-form source), I get the following:
Warning: FD_CVg.f90:1: Illegal preprocessor directive
Warning: FD_CVg.f90:56: Illegal preprocessor directive
Warning: FD_CVg.f90:67: Illegal preprocessor directive
FD_CVg.f90:17.6:
MWPOINTER PLHS(*), PRHS(*)
1
Error: Unclassifiable statement at (1)
FD_CVg.f90:27.6:
MWPOINTER MXCREATEDOUBLEMATRIX, MXGETPR
1
Error: Unclassifiable statement at (1)
FD_CVg.f90:32.6:
MWSIZE MXGETM, MXGETN
1
Error: Unclassifiable statement at (1)
FD_CVg.f90:41.6:
MWPOINTER tp,ndp,nap,edp,eap,eoxp,toxp,skindp,qfp,fmp,vgminp, &
1
Error: Unclassifiable statement at (1)
FD_CVg.f90:49.6:
MWSIZE M, N, NEL
1
Error: Unclassifiable statement at (1)
... and so on ...
the lines 1, 56 and 67 that trigger warnings are:
#include <fintrf.h>
#if defined MSWIND
#endif
respectively.
Any suggestions how to fix that?
(Using gfortran with xcode 3.2 on Mac OS X 10.6.8 with 64 bit matlab)
Réponse acceptée
Plus de réponses (3)
James Tursa
le 24 Oct 2011
0 votes
Is there a "/fixed" option (or similar) on the COMPFLAGS line in the mexopts file? If so, remove it. That is the typical problem with compiling free format source code on PC's. Don't know if this applies to mac or not.
Petar Bakalov
le 25 Oct 2011
0 votes
Petar Bakalov
le 29 Oct 2011
0 votes
Catégories
En savoir plus sur External Language Interfaces dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!