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

Unresolved external symbol

finnis_m
Beginner
724 Views
I am rebuilding some CVF projects with IVF 8.1.030. I haven't got very far as two of the projects (dynamic link libraries) which are dependencies of another won't link. The error messages given are similar to:

ModelessModule.obj : error LNK2019: unresolved external symbol _MODELESSMODULE_mp_MD1DLGSUB referenced in function _MODELESSMODULE_mp_DISPLAYDIALOG

In this case MD1DlgSub is a module procedure passed as a parameter to DlgSetSub - the call to DlgSetSub being in the module procedure DisplayDialog.

I thought I'd produce a cut-down project as an example of the problem. I used the above module (unedited) with ShowDialog called from a simple 3 line program. It links without errors.

Needless to say there is no problem linking with CVF.

Any suggestions?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
724 Views
I'd check to make sure that the DLL project really is a dependent of the main project. Check the build log to see if its library is being included. Check to see if there is a difference in calling conventions specified in the project properties under External Routines.

If the problem persists, send the full example to Intel Premier Support.
0 Kudos
finnis_m
Beginner
724 Views
Steve,

I shouldn't have used the word dependencies in this context. What I meant was I needed to build the dlls before I could build the application and I couldn't build the dlls.

I tried paring the code down in order to have something sensible as an example as the projects were fairly hefty. I did it using compiler directives and created a new project containing just the trimmed code which linked and built ok. As it was the same source code in each project I checked the project settings. The calling convention in the project that had been imported from a Visual Studio 6 project had been set to CVF (not unreasonably I guess). It seems that was the problem - setting the calling convention to default cured it; setting the calling convention to CVF in the projects that had built ok caused them to fail in the same way. (Presumably there is an error in the implementation of the calling convention since CVF can generate object code such that its linker can find the object code for a module procedure invoked from another module procedure in the same module.)

However, I still couldn't build the application - I had "Compilation Aborted (code 3)" during compilation of one of the source files which I've submitted to Premier Support.
0 Kudos
Reply