I am trying to compile a program which consists of multiple c and fortran source files. There is one C source which refuses to compile, because an identifier was defined somewhere else before it (I think)
The part of the code where compilation stops:
1 2 3 4 5
|
void F77_GetAcc(int_f77 *handle, int_f77 *ilo, int_f77 *ihi,
int_f77 *jlo, int_f77 *jhi, void *buff) {
DDI_GetAcc(*handle,*ilo-1,*ihi-1,*jlo-1,*jhi-1,buff);
}
| |
The source file is called ddi_fortran.c
I am compiling with MSVC++ 2017, and I am getting the error
Error C2059: syntax error : 'constant'
With Intel C/C++ compiler, I am getting:
error: expected an identifier
Now after some experimenting, I have found that putting
#undef F77_GetAcc
immediately before that line makes the error go away. Now I want to know where exacly F77_GetAcc was defined before, and whether putting #undef is going to harm the program in any way. Is there any way to pinpoint, where the identifier was defined before? The compiler output in command line does not give much information.
(Even though I am compiling on Windows, I thought the topic is general so I posted here, if it's not suitable, please let me know and I will move it)