Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / November 2003

Tip: Looking for answers? Try searching our database.

VC++.NET 2003 calling Fortran DLL fails

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dan Hoyt - 20 Oct 2003 22:13 GMT
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
>.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.