- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
.There have been a few postings on LNK4099, for examples,
http://software.intel.com/en-us/forums/topic/311987
http://software.intel.com/en-us/forums/topic/321946
http://software.intel.com/en-us/forums/topic/388459
related to native libraries. A recent (March, 2013) rebuild of a Fotran static library with
Intel(R) Visual Fortran Composer XE 2011 Integration for Microsoft Visual Studio* 2010, 12.0.3470.2010
/nologo /debug:full /Od /warn:interfaces /names:uppercase /iface:stdref /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc100.pdb" /traceback /libs:static /threads /dbglibs /c
used by a C++ dll has given LNK4099 errors for each of the Fortran routines
staticlib.lib(*.obj) : warning LNK4099: pdb 'vc100.pdb' was not found with 'staticlib.lib(*.obj)' or at z:\path\vc100.pdb'; linking object as if no debug info
used by the dll
file.h
extern "C" void __stdcall *(...)
where * = name of subroutine.
Excluding the staticlib.lib is not an option. The Fortran settings (e.g. STDCALL, REFERENCE (/iface:stdref)) have not changed.
Making the debug version of staticlib.lib without debug gets rid of the link warnings but this defeats the purpose of a debug build.
The LNK4099 diagnostics are just warnings but any advice on getting a successful debug build without LNK4099 would be welcome.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This warning means is the .pdb file for staticlib.lib was not found. Debugging information is in the .pdb file. If you are copying the staticlib.lib file, make sure to copy or link to the .pdb file as well.
You can still run your program without any issues without the .pdb file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Valid point Annalee. Thanks for the quick response. But what I did not make clear in the original post is that the staticlib.lib and pdb have not moved since the recent rebuild. Before the recent rebuild there were no LNK4099 messages but after, with the the files still in the same default locations from the build (unchanged signatures of the subroutines and interfaces in file.h and same directives to the C++ linker for the path to the staticlib.lib), now there are LNK4099 warnings.
One odd LNK4099 diagnostic refers to an obj for a *.f file that has subroutine in the static library that 0) is called within the library but 1) is not called from the C++ dll and 2) does not have an interface (extern "C" void __stdcall *(...)) defined in file.h. Don't know how the linker came up with this one or if there is some tool like dumpbin for a static library that might explain this. Or if some explicit attributes should be made for subroutines in the static library to correspond to the interfaces in file.h (like dllexport for a dll).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The .pdb files were most likely deleated in the clean step of the rebuild.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right. For sure the files were deleted during the build because they reappear with the same new time stamp
project_folder
vc100.pdb
Debug
mystaticlib.lib
in the (default) folders but after the rebuild the LNK4099 diagnostics appear when the C++ dll is built although the original build did not have any link errors. I don't think any IVF project settings were changed. Are there some project settings that would be useful to check?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page