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

IVF can't link with library, CVF can?

Rolf_A_
Beginner
446 Views
Hi,
Converting projects from CVF, and having problems linking to libraries that worked ok under CVF 6. IVF does find the library ok, but can't seem to access symbols properly.
PROGRAM japi_test
INTERFACE
LOGICAL FUNCTION j_start()
END FUNCTION
END INTERFACE
IF( .NOT. j_start()) THEN
PRINT *, "can't connect to JAPI Kernel"
END IF
END PROGRAM japi_test
This compiles fine but the linker reports
main.obj : error LNK2019: unresolved external symbol _J_START referenced in function _MAIN__
Debug/f90_test.exe : fatal error LNK1120: 1 unresolved externals
The functionis indeed present in the import library (JAPI.LIB) and its name (_J_START) agrees with the one in the .OBJ file.
Compare result of dumpbin /LINKERMEMBER:1 japi.lib:
Dump of file japi.lib
File Type: LIBRARY
Archive member name at 8: /
3E5B883A time/date Tue Feb 25 09:14:02 2003
uid
gid
0 mode
22D6 size
correct header end
397 public symbols
4A4C _DllMain@12
4C6C _J_ADD@8
.
.
1E106
_J_START@0
.
.
4636 __IMPORT_DESCRIPTOR_japi
48BC __NULL_IMPORT_DESCRIPTOR
4A4C
__imp__DllMain@12
.
1E106
__imp__J_START@0
.
.
4978 japi_NULL_THUNK_DATA

with dumpbin /SYMBOLS debugMAIN.OBJ:
Dump of file debugMAIN.OBJ
File Type: COFF OBJECT
COFF SYMBOL TABLE
.
.
012 00000000 SECT1 notype () External | _MAIN__
tag index 00000014 size 00000078 lines 00000459 next
.
.
01A 00000000 UNDEF notype () External | _J_START
01B 00000000 UNDEF notype () External |
.
.
.
This same source and import library file compile/link fine in CVF. What am I doing wrong?
Thanks much, Rolf
0 Kudos
1 Reply
Steven_L_Intel1
Employee
446 Views
You got good replies to this in comp.lang.fortran. Follow up here if you need more help.
0 Kudos
Reply