- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Steve

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