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

error There is no matching specific subroutine for this generic subroutine call.

Heli_N_
Beginner
1,475 Views

Dear all,

I am compiling my code where I used some external libraries.  I have some function calls from this external library.

call my_external_library_function(arg1,arg2,arg3,arg4)

At this line I get the following error:

Error    4     error #6285: There is no matching specific subroutine for this generic subroutine call. 

How can I fix this error?

Thank you very much for your help,

 

 

0 Kudos
5 Replies
Steve_Lionel
Honored Contributor III
1,475 Views

Do you have a module, include file or INTERFACE block that declares my_external_library_function as a generic interface? I will comment that snippets and paraphrases of code, accompanied by incomplete error message text, makes it difficult to help you. 

The message in general says that you have referenced a generic procedure but that the arguments you supplied don't match the signature of any declared specific item in that generic declaration.

If you'd like more help, please show a small but complete source that demonstrates the problem. If you're unable to do that, then show the actual source line, the actual and complete text of the error message (including source file name, line number, and offending identifier, the declarations of all actual arguments in the call and the declaration of the generic interface along with the interfaces of all of the specific names listed for the generic.

0 Kudos
Heli_N_
Beginner
1,475 Views

Hi Steve,

Thanks for your reply. The problem was solved by fixing an inconsistency I had in the number of arguments  in

call my_external_library_function(arg1,arg2,arg3,arg4).

After fixing this, now I get another error at the linking step. I would need to build Release or Debug version x64. How can I fix the below error? I have attached the screenshot from the error,

Thank you in Advance,

2017-03-21 11_03_49-DarcytoComsol - Microsoft Visual Studio (Administrator).png

 

 

0 Kudos
Steve_Lionel
Honored Contributor III
1,475 Views

You have a mixed C++/Fortran application and have different settings between the two languages for the run-time library type. Make sure they agree. One of the projects is using the non-debug DLL libraries and the other the debug static libraries. Fix the inconsistency - using the DLL libraries is preferable.

0 Kudos
Heli_N_
Beginner
1,474 Views

Dear Steve,

I have a pure FORTRAN program and the external libraries I am using are FORTRAN as well. What could be causing my error and how which settings  could  fix this?

Please let me know if you need any more info.

Thanks in Advance,

 

 

0 Kudos
Steve_Lionel
Honored Contributor III
1,474 Views

The setting is Fortran > Libraries > Use Run-Time Library. Both your executable and static library project need to have the same setting here.

An alternative, which I generally prefer, is to set the property Fortran > Libraries > Disable OBJCOMMENT directives... to Yes in the static library project only. This will then rely on the executable project to pull in the correct libraries.

0 Kudos
Reply