- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
I am making a project with C and F77 and the main program is written by F77. During build my code, I was trouble about errors as follows. There was no such error in my previous project written only by F77.
1>atemp.obj : error LNK2001: unresolved external symbol etime
1>banner.obj : error LNK2001: unresolved external symbol getdat
1>dyn4.obj : error LNK2001: unresolved external symbol gettim
1>Diglib.lib(gdhpdj.obj) : error LNK2001: unresolved external symbol tiffpak
fatal error LNK1120: 4 unresolved externals
But I am sure about that subroutines etime, getdat and gettim are included in fortran77 library.
Platform:
Intel® Parallel Studio XE 2016 Update 2 Composer Edition for Fortran Windows* Integration for Microsoft Visual Studio* 2015, Version 16.0.0061.14
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
gettim, getdat, and etime are in the fortran portability module so you should have "USE IFPORT" in your source
I don't know tiffpak I guess this is some third part libary you need to include in the linking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Following both of your suggestions, I passed the build. Thank you very much. But there was no such error in my previous f77 project without "use ifport". Why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess would be that tiffpak has to do with TIFF files. But could the problem be caused by a change in name mangling/calling convention? Of old, Compaq Visual Fortran used the stdcall convention (as did a lot of libraries) and that meant that the routine names were in capitals with the number of bytes in the argument list appended.
Try setting the calling convention to "stdcall". This might solve the issue with tiffpak.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I assume you were using some other compiler earlier. None of those routines are part of the Fortran language. Since you're posting on the Windows forum, I note that you are probably using /names:lowercase to make up for some other nonportable assumptions in your program. With that, the external names for ETIME, GETDAT and GETTIM are inconsistent with those we provide in the portability library. Adding USE IFPORT explicitly declares these routines with the correct external name so that the link errors go away.
tiffpak is something else entirely. Again, it's nonportable assumptions about names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for all of your suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trouble again, why don't my program pause at F9 breakpoints with F5 debug?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page