- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to debug my Fortran source code. However, when I build the project with the source codes, I get these linking errors:
LINK : warning LNK4217: symbol '_DMS_RGLOB' defined in 'aspenwrapper.obj' is imported by 'aspenwrapper.obj' in function '_GMELCU'
LINK : warning LNK4217: symbol '_DMS_PLEX' defined in 'aspenwrapper.obj' is imported by 'aspenwrapper.obj' in function '_GMELCU'
LINK : warning LNK4217: symbol '_DMS_NCOMP' defined in 'aspenwrapper.obj' is imported by 'aspenwrapper.obj' in function '_GMELCU'
LINK : warning LNK4286: symbol '_PPUTL_PPGLOB' defined in 'aspenwrapper.obj' is imported by 'aspenwrapper.obj'
LINK : warning LNK4286: symbol '_PPEXEC_USER' defined in 'aspenwrapper.obj' is imported by 'aspenwrapper.obj'
aspenwrapper.obj : error LNK2019: unresolved external symbol _DMS_WRTTRM referenced in function _WRITEASPEN
aspenwrapper.obj : error LNK2019: unresolved external symbol _DMS_IFCMNC referenced in function _GMELCU libifcoremdd.lib(for_main.obj) :
error LNK2019: unresolved external symbol _MAIN__ referenced in function _main
Debug\Aspendebug.exe : fatal error LNK1120: 3 unresolved externals
DMS_RGLOB, DMS_PLEX, DMS_NCOMP, PPUTL_PPGLOB, and PPEXEC_USER are .cmn files that are provided by Aspen, which were included in the source code by using: #include 'dms_rglob.cmn'. I've been unable to figure out how to solve this issue. Any help would be appreciated.
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not know the Aspen software but a reason for this type of error messages is that you forgot to include some library at the link step. Could you show what these .cmn file look like? How do you use these symbols, DMS_RGLOB, for instance? Is it s a subroutine or function? Some external data?
Included files are simply pieces of Fortran code - the ".cmn" extension is arbitrary, but it suggests that common block are involved. So it is of interest to see what the typical content is of such files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DMS_RGLOB appears to be defining and storing variables. I am attaching a screenshot of it. Is it in Linker => General => Additional Library directories, that I have to give the directories for the libraries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right, these are COMMON-blocks defined in a DLL. You would have to specify the import library for this DLL in the Linker => General => Input => Additional Dependencies. The documentation for the Aspen software should give you the proper name.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page