- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All:
I've built a DLL called fStatistics using IVF 11.1.048 inVS2005.
It includes static libraries fDebug and fNumbers8 and
regsvr32 cannot load it.
Both static libraries are built using the following compile command line (line delimited by me):
/nologo /fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release\"
/object:"Release\"
/libs:dll /threads/libdir:noauto /libdir:nouser /c
The static library link lines are
/OUT:"Release/fNumbers8.lib" /NOLOGO
/OUT:"Release/fDebug.lib" /NOLOGO
The static library*.lib files are copied to folder %DDslib%.
The static library *.mod files are copied to folder %DDinclude%.
For the dynamic library fStatistics, I've added the static libraries to the project and
specified$(DDinclude) as an additional include directory.
For the DLL, the fortran compile line is :
/nologo/I"C:\Program Files\DuPont\include"/fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release\"
/object:"Release\"
/libs:dll /threads /libdir:nouser /c
For the DLL, the link command line is:
/OUT:"Release\fStatistics.dll" /NOLOGO
/MANIFEST /MANIFESTFILE:"C:\...\fStatistics\fStatistics\Release\fStatistics.dll.intermediate.manifest"
/SUBSYSTEM:WINDOWS
/IMPLIB:"C:\...\fStatistics\fStatistics\Release\fStatistics.lib" /DLL
I copy the lib and the dll file to folder %DDdlib%.
From the command prompt fromdirectory C:\Program Files\DuPont\DLIB,
I see the newly created fStatistics.lib and fStatistics.dll files.
> Regsvr32 fStatistics.dll returns the error message
LoadLibrary ("fStatistics.dll") failed - The specified procedure could not be found
What am I doing wrong ?
Thanks,
Cliff
I've built a DLL called fStatistics using IVF 11.1.048 inVS2005.
It includes static libraries fDebug and fNumbers8 and
regsvr32 cannot load it.
Both static libraries are built using the following compile command line (line delimited by me):
/nologo /fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release\"
/object:"Release\"
/libs:dll /threads/libdir:noauto /libdir:nouser /c
The static library link lines are
/OUT:"Release/fNumbers8.lib" /NOLOGO
/OUT:"Release/fDebug.lib" /NOLOGO
The static library*.lib files are copied to folder %DDslib%.
The static library *.mod files are copied to folder %DDinclude%.
For the dynamic library fStatistics, I've added the static libraries to the project and
specified$(DDinclude) as an additional include directory.
For the DLL, the fortran compile line is :
/nologo/I"C:\Program Files\DuPont\include"/fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release\"
/object:"Release\"
/libs:dll /threads /libdir:nouser /c
For the DLL, the link command line is:
/OUT:"Release\fStatistics.dll" /NOLOGO
/MANIFEST /MANIFESTFILE:"C:\...\fStatistics\fStatistics\Release\fStatistics.dll.intermediate.manifest"
/SUBSYSTEM:WINDOWS
/IMPLIB:"C:\...\fStatistics\fStatistics\Release\fStatistics.lib" /DLL
I copy the lib and the dll file to folder %DDdlib%.
From the command prompt fromdirectory C:\Program Files\DuPont\DLIB,
I see the newly created fStatistics.lib and fStatistics.dll files.
> Regsvr32 fStatistics.dll returns the error message
LoadLibrary ("fStatistics.dll") failed - The specified procedure could not be found
What am I doing wrong ?
Thanks,
Cliff
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does your DLL include DllRegisterServer and DllUnregisterServer routines, properly exported? If not, what do you expect to happen when you use Regsvr32?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Absent a complete path specification, LoadLibrary looks for .dll files in the directory where the .exe is located. Your other pathing relates to how your project is built, not what happens when it runs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Cliff Phares
Hello All:
I've built a DLL called fStatistics using IVF 11.1.048 inVS2005.
It includes static libraries fDebug and fNumbers8 and
regsvr32 cannot load it.
Both static libraries are built using the following compile command line (line delimited by me):
/nologo /fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release"
/object:"Release"
/libs:dll /threads/libdir:noauto /libdir:nouser /c
The static library link lines are
/OUT:"Release/fNumbers8.lib" /NOLOGO
/OUT:"Release/fDebug.lib" /NOLOGO
The static library*.lib files are copied to folder %DDslib%.
The static library *.mod files are copied to folder %DDinclude%.
For the dynamic library fStatistics, I've added the static libraries to the project and
specified$(DDinclude) as an additional include directory.
For the DLL, the fortran compile line is :
/nologo/I"C:Program FilesDuPontinclude"/fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release"
/object:"Release"
/libs:dll /threads /libdir:nouser /c
For the DLL, the link command line is:
/OUT:"ReleasefStatistics.dll" /NOLOGO
/MANIFEST /MANIFESTFILE:"C:...fStatisticsfStatisticsReleasefStatistics.dll.intermediate.manifest"
/SUBSYSTEM:WINDOWS
/IMPLIB:"C:...fStatisticsfStatisticsReleasefStatistics.lib" /DLL
I copy the lib and the dll file to folder %DDdlib%.
From the command prompt fromdirectory C:Program FilesDuPontDLIB,
I see the newly created fStatistics.lib and fStatistics.dll files.
> Regsvr32 fStatistics.dll returns the error message
LoadLibrary ("fStatistics.dll") failed - The specified procedure could not be found
What am I doing wrong ?
Thanks,
Cliff
I've built a DLL called fStatistics using IVF 11.1.048 inVS2005.
It includes static libraries fDebug and fNumbers8 and
regsvr32 cannot load it.
Both static libraries are built using the following compile command line (line delimited by me):
/nologo /fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release"
/object:"Release"
/libs:dll /threads/libdir:noauto /libdir:nouser /c
The static library link lines are
/OUT:"Release/fNumbers8.lib" /NOLOGO
/OUT:"Release/fDebug.lib" /NOLOGO
The static library*.lib files are copied to folder %DDslib%.
The static library *.mod files are copied to folder %DDinclude%.
For the dynamic library fStatistics, I've added the static libraries to the project and
specified$(DDinclude) as an additional include directory.
For the DLL, the fortran compile line is :
/nologo/I"C:Program FilesDuPontinclude"/fixed
/warn:declarations /warn:unused /warn:interfaces /names:as_is
/module:"Release"
/object:"Release"
/libs:dll /threads /libdir:nouser /c
For the DLL, the link command line is:
/OUT:"ReleasefStatistics.dll" /NOLOGO
/MANIFEST /MANIFESTFILE:"C:...fStatisticsfStatisticsReleasefStatistics.dll.intermediate.manifest"
/SUBSYSTEM:WINDOWS
/IMPLIB:"C:...fStatisticsfStatisticsReleasefStatistics.lib" /DLL
I copy the lib and the dll file to folder %DDdlib%.
From the command prompt fromdirectory C:Program FilesDuPontDLIB,
I see the newly created fStatistics.lib and fStatistics.dll files.
> Regsvr32 fStatistics.dll returns the error message
LoadLibrary ("fStatistics.dll") failed - The specified procedure could not be found
What am I doing wrong ?
Thanks,
Cliff
Your DLL is either of the COM or regular variety. Only the first needs to be registered via regsvr32 so that registering a regular DLL is redundant. If the DLL is of the classic type then youthe Win API LoadLibrary which requires the DLL`s name as a C string. Use either DUMPBIN or the Depends utility to find out what the DLL exports areand it should be immediately evident whether you have a COM, whose interfaces are accessed with the help of the IVF COM Wizard, or a regular DLL, whose exports are accessed via the API in conjunction with integer pointers, on your hands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does your DLL include DllRegisterServer and DllUnregisterServer routines, properly exported? If not, what do you expect to happen when you use Regsvr32?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
Does your DLL include DllRegisterServer and DllUnregisterServer routines, properly exported? If not, what do you expect to happen when you use Regsvr32?
Thanks Steve. I had other problems as well. But I'll start a new thread for those.
When I compiled my fStatistics as a static library,
I used Fortran > Libraries > RunTime Library = Multithread DLL (/libs:dll /threads).
I think the libs:dll triggered the directives:
!DEC$ IF DEFINED (_DLL)
!DEC$ ATTRIBUTES DLLEXPORT, DEFAULT :: fSTAT_StDev
!DEC$ ATTRIBUTES ALIAS:'fSTAT_Stdev' :: fSTAT_StDev
!DEC$ ATTRIBUTES REFERENCE :: N
!DEC$ ATTRIBUTES REFERENCE :: X
!DEC$ ATTRIBUTES REFERENCE :: Mean
!DEC$ ATTRIBUTES REFERENCE :: UnBiasedIfOne
!DEC$ ENDIF
When I tested the fStatistics static library in a fortran console program,
I kept getting link error unresolved symbol _imp_fSTAT_StDev.
While I haven't yet rebuilt fFTSD with the newly rebuilt fStatistics static library,
I know that fStatistics static library works.
The issue I have now is around best practices for using system libraries in my static library and dynamic library builds. But I'll start another thread for that one.
Thanks much for your help.

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