Software Archive
Read-only legacy content
17061 Discussions

unresolved external symbol

Intel_C_Intel
Employee
424 Views
I'm trying to build a VF-dll (doeiets2.dll), which is calling a routine (LIJN) in a Delphi-dll, but can't get around the unresolved external symbol message.
the sourcecode of the VF-dll is:

integer*4 Function FortFunInt (x0,y0,x1,y1)
INTERFACE
SUBROUTINE LIJN (x0,y0,x1,y1)
!DEC$ ATTRIBUTES STDCALL, DLLIMPORT :: LIJN
INTEGER*4 x0,y0,x1,y1
END SUBROUTINE LIJN
END INTERFACE

!DEC$ ATTRIBUTES STDCALL, DLLEXPORT :: FortFunInt
!DEC$ ATTRIBUTES ALIAS : "_fortfunint" :: FortFunInt

integer*4 x0,y0,x1,y1
call LIJN (x0,y0,x1,y1)
FortFunInt = 1
return
end function FortFunInt

the error message is:

Deleting intermediate files and output files for project 'doeiets2 - Win32 Debug'.
--------------------Configuration: doeiets2 - Win32 Debug--------------------
Compiling Fortran...
D:Fortrandoeiets2Loadexp1.f90
Linking...
Creating library Debug/doeiets2.lib and object Debug/doeiets2.exp
Loadexp1.obj : error LNK2001: unresolved external symbol _lijn@16
Debug/doeiets2.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

doeiets2.dll - 2 error(s), 0 warning(s)

what am I doing wrong?
thanks
Winfried
0 Kudos
1 Reply
Steven_L_Intel1
Employee
424 Views
You probably need an ALIAS attribute for LIJN - not sure what it would be. Try this - run Dependency Walker in the Visual Fortran program group. Drag your Delphi DLL into the window. One of the sub-windows should show a list of the exported routine names, and you'll find the exact spelling of your LIJN routine there.

Steve
0 Kudos
Reply