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

Help understanding linker error "Unresolved external"

dboggs
New Contributor I
337 Views

I am developing a project that includes a module XYGraph and subroutine XYPlot, which I compile for redistribution to other programmers working in my group. The object files XYGraph.obj and XYPlot.obj are put in a library project, CPPf90.lib. The files XYGraph.mod and CPPf90.dbg.lib (my name for the debug build version of the library) were then given to Fred.

The module XYGraph and subroutine XYPlot both contain calls to Intel Quickwin routines SETLINEWIDTHQQ and GETLINEWIDTHQQ. When Fred attempts to build his project, he gets linker errors

"unresolved external symbol _setlinewidth referenced in function _XYGRAPH_mp_..... and similar with _getlinewidth, these are evidently generated by the module; and similar errors apparently generated by the lib file.

Note that the external symbols referenced in the errors do not include the appended QQ that are used in the original code. Is this normal? What other information is needed to pursue this?

0 Kudos
1 Reply
andrew_4619
Honored Contributor III
337 Views

In IFQWIN you have

[fortran]    INTERFACE
        FUNCTION GETLINEWIDTHQQ()
    !DEC$ ATTRIBUTES DEFAULT :: GETLINEWIDTHQQ
        INTEGER*4 GETLINEWIDTHQQ
    !DEC$ ATTRIBUTES DECORATE,C,ALIAS:"_getlinewidth" ::  GETLINEWIDTHQQ
          END FUNCTION
    END INTERFACE[/fortran]

I am not sure what LIB getlinewidth is in, I do not think it is part of the windows SDK as line width is set using CreatePen, perhaps it is in the clib? Does fred's app include use IFQWIN? I would expect these to be resolved if it did.

 

Is qwin.lib in the link path?

0 Kudos
Reply