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

Fortran DLL and console Application

babe59
Beginner
1,081 Views
Hello,
I made a FORTRAN DLL that i use on C# program (VS2005) - Inel fortran 11.0 -
All work fine when i use my Fortran DLL on a WinForm application. But I've got an error when i 'use it on Console Application. Error : "Forrtl : Severe (38): error during write, unit -1, file CONOUT$ ...".
Here my console application

"

namespace ConsoleApplication1

{

class Program

{

[DllImport("aaa.calib.for.dll")]

private static extern void SIMUL([In] string Path, [In] ref Int32 PathLentgh);

static void Main(string[] args)

{

String Path = @"D:\Calib\1";

Int32 PathLentgh = Path.Length;

SIMUL(Path, ref PathLentgh);

}

}

thks

0 Kudos
8 Replies
Steven_L_Intel1
Employee
1,081 Views
Which specific 11.0 update are you using? There was a problem at one point in 11.0 where this error could occur, but it was fixed in 11.0.075. (You would have to rebuild your DLL.) 11.1.038 is current.
0 Kudos
babe59
Beginner
1,081 Views
Which specific 11.0 update are you using? There was a problem at one point in 11.0 where this error could occur, but it was fixed in 11.0.075. (You would have to rebuild your DLL.) 11.1.038 is current.

Hello,
I use 11.0.61
I update compiler with 11.1.038 version but now i'couldn't open my Visual Studioproject (no specific error, just "VS2005 stop to work").
I work with VS2005 on Vista PRO (I apply VS2005 SP1 for Vista on my computer)

I try to create a new DLL Fortran project on it's look work but i must set all compiler options as the first project.
Thereis not a solution to continue to use my project created on 11.0.61 ?

Note : I think that the problem du to configuration option. I copy configuration options to my 11.0.61 project file to my 11.1.038 project file and VS 2005 stop to work to...
0 Kudos
Steven_L_Intel1
Employee
1,081 Views

Your 11.0 project should open without error. You will get a prompt to convert it to the 11.1 format which you should allow it to do.
0 Kudos
babe59
Beginner
1,081 Views

Your 11.0 project should open without error. You will get a prompt to convert it to the 11.1 format which you should allow it to do.

it is not the case... my 11.0 project goes on error before the end of loading...
My 11.0 project is composed of 3 projects (first project is Fortran DLL, the 2 other projects are C# projects (to test Fortran DLL))

I left Fortran DLL to a new project and rebuild it and it's ok but i must set all compiler options as 11.0 project (but i can't open 11.0 project to see them ...)

0 Kudos
Steven_L_Intel1
Employee
1,081 Views
Would you please ZIP the .sln and .vfproj files and attach the ZIP here?
0 Kudos
babe59
Beginner
1,081 Views
Would you please ZIP the .sln and .vfproj files and attach the ZIP here?
here zip file (thanks a lot)
0 Kudos
Steven_L_Intel1
Employee
1,081 Views

The Fortran project opens fine for me as long as I put the .vfproj into a GTS.CALIF.FOR subfolder under the solution folder.
0 Kudos
babe59
Beginner
1,081 Views

I made a new project and set options again. My project work fine now... The 11.1.038 version is ok

Thks
0 Kudos
Reply