Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

Converting Mixed C/Fortran from MSV2008 to MSV2012, C2065 errors

$
0
0

I'm in process of converting from Microsoft Visual Studio 2008 to MSV2012 for my mixed code, C and FORTRAN application.

The code compiles and executes perfectly for MSV2008 but I receive many, many error messages for the C portion of my code

when I try to compile using MSV2012 wrapper.

The compiler does not like the line:

int _stdcall OPEN_MATLAB(name,ll)

The first couple of error messages are :

1>Source\matlab.c(38): error C2065: 'name' : undeclared identifier

1>Source\matlab.c(38): error C2065: 'll' : undeclared identifier

I've imported all the project properties from MSV2008 into MSV2012, and, I've compared all the compiler flags.

The flags appear to be the same in both MSV2008 and MSV2012. I'm guessing that MSV2012 needs to have some

compiler flag set, so that it is doing the same thing that MSV2008 was doing for me.

I'm a FORTRAN programmer that has inherited this C code (i.e. I don't know C very well). Any help would be greatly

appreciated.

Here's what the code looks like:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#include "stdio.h"

#include "string.h"

#define DATASIZE float

#define ISIZ int

typedef struct

{

ISIZ type;

ISIZ mrows;

ISIZ ncols;

ISIZ imagf;

ISIZ namlen;

ISIZ name;

}Fmatrix;

FILE *fp;

int _stdcall OPEN_MATLAB(name,ll)

char name[];

int ll;

{

fp = fopen(name,"ab");

if (fp != NULL)

return(0);

else

return(1);

}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>