Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Forrtl: severe (157)

Brian_Allison
Beginner
791 Views

am having problems with my DLL compiled with IVF 10.1.021. If I compile an EXE it works fine. If I compile a DLL with CVF, it works fine. THe problem is with the tty lines in my code. I have to comment them out in order for it to work in the IVF DLL. Here is an example of the tty code.

! Set program title.
write (tty,"(a)") ptitle(1:24)
write (output,"('1',3x,a)") ptitle

Here is what the tty =

integer, parameter :: tty=6

It does open a console window on run. Here it is at the point of crash.

0 Kudos
4 Replies
Brian_Allison
Beginner
791 Views

A write to the screen using "write (6...." works coming from the coding in the main EXE, but fails when a "write (6...." is called from a dll, which was called within the main program or one of its subroutines. The write to a file works properly from the same dll.

0 Kudos
Steven_L_Intel1
Employee
791 Views

Make sure that the EXE is linked to the same library type as your DLL (Either Multithreaded DLL or Multithreaded Debug DLL).

0 Kudos
DavidWhite
Valued Contributor II
791 Views

Brian,

The DLL needs to open a console window itself.

David

0 Kudos
Brian_Allison
Beginner
791 Views

How do you have the dll open a console?

0 Kudos
Reply