Software Archive
Read-only legacy content
17061 Discussions

Compatibility with NPD Fortran compiler

Intel_C_Intel
Employee
523 Views
I'm working on an old code and trying to modify it.Original code is compiled with NPD Fortran compiler (which I've not heard before) and now I've the very classical error for you "error LNK2001: unresolved external symbol _CDAT@20".Is the problem due to the mixed version of libraries?If yes, how can I find the the right lib file?
0 Kudos
3 Replies
Steven_L_Intel1
Employee
523 Views
It probably will not work to link CVF code against libraries compiled by the NPD compiler. Do you have all the sources?

If the NPD code is link-compatible with CVF, you probably still have to deal with differences in naming and calling conventions. In a Fortran Command Prompt window, do a:

dumpbin -symbols xxx.obj > dump.txt

on the object (or .lib) Then open dump.txt in NOTEPAD and look for CDAT to see how it appears. Look for lines that resemble this:

00C 00000000 SECT1  notype ()    External     | _TEST@0


You want to see how the name CDAT appears here - is it _cdat, _CDAT, or something else?

Steve
0 Kudos
Intel_C_Intel
Employee
523 Views
Yes I have all the source codes.When I'm compiling these codes there is no error.The error comes during the execution of the program.
I did exactly what you said (In Fortran Command Prompt) and I'm copying the line including CDAT:

019 00000000 UNDEF notype () External | _CDAT@20

nc
0 Kudos
Steven_L_Intel1
Employee
523 Views
Actually, the error is coming during the linking, not the execution. The line you show is of the reference to CDAT, not the declaration.

Since you have the sources - find routine CDAT and reply here with the SUBROUTINE or FUNCTION statement, and all the type declarations of its arguments. Do the same with the call to CDAT (the call statement and the types of its arguments). My guess is that you have a type mismatch.

Steve
0 Kudos
Reply