Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

Declaration of a routine is reported to conflict with a previous one, but there is none

Arjen_Markus
Honored Contributor I
965 Views

I am getting an error message

error #5508: Declaration of routine 'XYZ' conflicts with a previous declaration

but there is no other routine XYZ declared anywhere. I am sure of this, because I changed the name by appending random letters and each time the new name is reported in the same error message. When I remove the declaration and implementation altogether, the compiler complains about another routine in the same source file.

As this is part of a fairly large program with lots of modules in different directories, it is not easy to post the code (though not entirely impossible).

What is going wrong here? And, more importantly, how can I prevent this error to occur?

0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
962 Views

Solved - it was apparently a consequence of left-over stuff that was not cleaned up properly by Visual Studio's "Clean solution" task (the project in case stores some .mod in a non-default directory). Nothing like a busy day to put you off guard for this sort mixups :(.

View solution in original post

0 Kudos
3 Replies
Arjen_Markus
Honored Contributor I
963 Views

Solved - it was apparently a consequence of left-over stuff that was not cleaned up properly by Visual Studio's "Clean solution" task (the project in case stores some .mod in a non-default directory). Nothing like a busy day to put you off guard for this sort mixups :(.

0 Kudos
andrew_4619
Honored Contributor II
930 Views

I have suffered that exact same problem!

0 Kudos
Arjen_Markus
Honored Contributor I
894 Views

Glad I am not the only one falling into that trap. It took me quite some time to figure it out and only when a colleague reported success with building the same problem without having such difficulties I realised that it might be caused by something entirely different than the source code.

0 Kudos
Reply