compiler problem

When the use of the PGI compiler compiled out of the lib and then compile can not find the obj should be in the lib

Hi yaoshunyu,

Sorry, but I’m going to need more details in order to help.

What language is the object in the library? What language is the application? Fortran name mangles symbols so if you’re mixing C and Fortran, you need to ensure the C symbol is the same as the Fortran name manged symbol (i.e. lower-case with an appended underbar, “_”), or have the Fortran code using F2003 ISO_BINDING interface.

Have you done an “nm” on the library to ensure the symbol exists?

Any other information that you can provide to help diagnose the issue would be welcome.

-Mat

compiler result lib can not find symbol that compiler early

only fortran,how to use nm

Hi yaoshunyu,

Again, without details, it’s difficult to give advice.

From your other post, it appears that you’re using Windows and trying to create a DLL?

In that case, are you exporting the symbols?

Details on how to build DLLs can be found in our documentation at: https://www.pgroup.com/resources/docs/19.9/x86/pgi-user-guide/index.htm#lib-dynlnk-win-create-use

how to use nm

Apologizes, I was assuming that you were on Linux. On Windows, you can use the PGI supplied “pgnm” utility to extract symbol names from LIB or DLL so you can see if the symbol exists and if it’s name mangled.

Example:

pgnm mylib.lib

-Mat