error #6236 when building Fortran mex file

When I tried to build Fortran mex-file in 64-bit Matlab2014a, it was aborted with messages like the following.
error #6236: A specification statement cannot appear in the executable section.
integer*4 dims(num_dim)
------^
error #6236: A specification
statement cannot appear in the executable section.
integer task,i
------^
I built the same code successfully with previous Matlab versions.Does anyone have any idea how I should deal with this? Many thanks!

Réponses (1)

Walter Roberson
Walter Roberson le 26 Août 2015

1 vote

One of the #include files probably has an executable statement instead of just type information. What are the non-comment lines right before the first of the errors?

3 commentaires

Thank you for your reply. Two lines before the first error are
mwSize num_dim
num_dim = 3
Do you mean that? I only have #include "fintrf.h" in my code.
Walter Roberson
Walter Roberson le 26 Août 2015
num_dim = 3 is not a valid statement before an integer*4 declaration. All declarations must proceed all executable statements. If you are using num_dim to define array dimensions then you should consider whether you should be using a PARAMETER statement.
Jackie
Jackie le 26 Août 2015
Ah, I see. Thank you so much for helping me out!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Fortran with MATLAB dans Centre d'aide et File Exchange

Tags

Question posée :

le 26 Août 2015

Commenté :

le 26 Août 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by