I have a C++ program that dynamically loads Compaq Visual
Fortran v6.6 DLLs and invokes them. I have two Fortran
DLLs, one that only does calculations and standard
output, the other that also includes its own file I/O.
The first DLL loads and executes properly, but not the
second. It loads properly and begins execution, but as
soon as I get to a file open command, it heads off for
space and never returns.
This program is cross-platform, as well, and works
properly under Solaris, so it sounds to me like it's a
library linking problem or something like that.
All the Fortran DLLs are created as multi-threaded, which
according to MS help, links with DFORMDD.LIB (debug),
which in turn automatically links MSVCRTD.LIB into the
DLLS.
In VC++.NET 2003, the executable is created as multi-
threaded also. In a vain attempt to avoid library
collisions, I tried explicitly ignoring LIBCMTD.LIB and
OLDNAMES.LIB and linking in DFORMDD.LIB, but I got the
same result as linking with the default libraries.
Any ideas?
In advance, thank you for your help.
-Dan Hoyt
Dan Hoyt - 19 Nov 2003 23:14 GMT
I resolved this.
The working Fortran code was a red herring. The C++
program also linked with the NCBI C++ Toolkit
(http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/ for
anyone who is interested), which was compiled with the
static C libraries. Hence, collisions. Works fine when
the NCBI Toolkit is compiled with the dynamic C libraries
(so the executable only has ONE C library to deal with).
-Dan
>-----Original Message-----
>I have a C++ program that dynamically loads Compaq Visual
[quoted text clipped - 28 lines]
>-Dan Hoyt
>.