Hello, I am getting syntax errors in this file upon compile but I can't figure out what is wrong. Can someone comment?
Thanks.
The errors are:
cinterface3.cpp(17) : error C2065: 'DWORD' : undeclared identifier
cinterface3.cpp(17) : error C2146: syntax error : missing ';' before identifier 'tid'
cinterface3.cpp(17) : error C2065: 'tid' : undeclared identifier
cinterface3.cpp(19) : error C2065: 'HANDLE' : undeclared identifier
cinterface3.cpp(19) : error C2146: syntax error : missing ';' before identifier 'hThread'
cinterface3.cpp(19) : error C2065: 'hThread' : undeclared identifier
cinterface3.cpp(21) : error C2065: 'CreateThread' : undeclared identifier
cinterface3.cpp(23) : error C2146: syntax error : missing ';' before identifier 'CloseHandle'
cinterface3.cpp(23) : error C2065: 'CloseHandle' : undeclared identifier
#include <stdio.h>
#include <string.h>
struct io {
char time[10];
int start;
};
struct io cio;
extern "C" __declspec(dllimport) void _stdcall FTREND3
( long * );
void main (void)
{
DWORD tid, cio;
HANDLE hThread;
hThread = CreateThread(NULL, 0, FTREND3, &cio, 0, &tid)
CloseHandle(hThread);
printf("In c after fortran thread started\n\n"
printf("string = %s\n",cio.time);
}
Thanks.
The errors are:
cinterface3.cpp(17) : error C2065: 'DWORD' : undeclared identifier
cinterface3.cpp(17) : error C2146: syntax error : missing ';' before identifier 'tid'
cinterface3.cpp(17) : error C2065: 'tid' : undeclared identifier
cinterface3.cpp(19) : error C2065: 'HANDLE' : undeclared identifier
cinterface3.cpp(19) : error C2146: syntax error : missing ';' before identifier 'hThread'
cinterface3.cpp(19) : error C2065: 'hThread' : undeclared identifier
cinterface3.cpp(21) : error C2065: 'CreateThread' : undeclared identifier
cinterface3.cpp(23) : error C2146: syntax error : missing ';' before identifier 'CloseHandle'
cinterface3.cpp(23) : error C2065: 'CloseHandle' : undeclared identifier
#include <stdio.h>
#include <string.h>
struct io {
char time[10];
int start;
};
struct io cio;
extern "C" __declspec(dllimport) void _stdcall FTREND3
( long * );
void main (void)
{
DWORD tid, cio;
HANDLE hThread;
hThread = CreateThread(NULL, 0, FTREND3, &cio, 0, &tid)
CloseHandle(hThread);
printf("In c after fortran thread started\n\n"
printf("string = %s\n",cio.time);
}