View previous topic :: View next topic |
Author |
Message |
GMMitchell
Joined: 26 Aug 2005 Posts: 3
|
Posted: Fri Aug 26, 2005 8:05 am Post subject: Linking 3rd Party dlls with F95 applications |
|
|
I have developed an application in F95 using the Salford compiler [with Winteracter v6.1 for the front end as well] which also has a 3rd party dll. Within this code is an interface routine with the usual STDCALL statements to allow the fortran to interface to the c++ dll. The export library is linked in and all is well. I have been sent a new version of the code and despite checking for changes in routine names and altering where appropriate all the symbols required from the dll are reported as missing at link time. In addition if I use slink to re-export the original dll to a new .lib file and use that [thinking that it would test the exporting process] with the original version of the code the link fails as well. There is clearly something about the way the export is done which is different betweent the old .lib file and the new one and the new one I created from the old dll. What on earth is going on? I am baffled...no doubt someone with more experience than I dealing with dlls will know...and I'd be very grateful for some advice...anyone?? Is there a setting required when carrying out the export to produce the .lib file?
George Mitchell |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8036 Location: Salford, UK
|
Posted: Sat Aug 27, 2005 1:47 am Post subject: Linking 3rd Party dlls with F95 applications |
|
|
I assume that you are using /IMPORT_LIB for the 3rd parth STDCALL DLL.
After that I would use SLINK with MAP (and possibly DECORATE) to get details of the mismatch.
I don't see how it will make any difference if you recreate the 3rd party DLL using SLINK unless you want to change the name of a routine in which case it would be simpler to change your code.
|
|
Back to top |
|
|
Anonymous Guest
|
Posted: Wed Aug 31, 2005 7:37 am Post subject: Linking 3rd Party dlls with F95 applications |
|
|
yes indeed. I can now resolve all symbols except 1 [yes I have checked the spelling till I am blue in the face] but now obtain the following as well...
WARNING the following symbols are missing:
_imp__LoadLibraryA E:SPLATSoftwarefpsdk.lib (/0 )
(.ReleaseSolverSDK.obj)
*** Imported common not satisfied: LoadLibraryA@4
_imp__GetProcAddress E:SPLATSoftwarefpsdk.lib (/0 )
(.ReleaseSolverSDK.obj)
*** Imported common not satisfied: GetProcAddress@8
_fltused E:SPLATSoftwarefpsdk.lib (/0 )
(.ReleaseSolverSDK.obj)
*** Imported common references not satisfied or Imported data missing
Link errors encountered
What does this mean?
thanks
George Mtichell |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8036 Location: Salford, UK
|
Posted: Wed Aug 31, 2005 1:05 pm Post subject: Linking 3rd Party dlls with F95 applications |
|
|
LoadLibrary, and GetProcAddress are Windows API functions located in Kernel32.dll.
However, I would have expected SLINK to reference Kernel32.dll without the user having to load it.
LoadLibraryA is the ASCII character alternative to LoadLibraryW (the wide character form). @4 and @8 are standard STDCALL decorations all of which should be handled by SLINK automatically.
If SLINK managed to create the executable then you will be able to use it until these functions are called.
You could try loading kernel32.dll (in SLINK) after loading the third party dll but this should not make any difference. Within SLINK (in script mode) you can use LURE to list unresolved references. |
|
Back to top |
|
|
|