<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem calling fortran dll from C# in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819658#M46995</link>
    <description>&lt;DIV&gt;Thanks, that helped me a lot, but I still have some trubles.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;This is a project where I got about 10.000 lines of pregenerated source code, witch was set up as a .exe-project. I now have problems converting this to an unmanaged dll. My solution now has 2 projects; one Console Application, and one Static Library. I have tried to make a Dynamic-link Library out of the Console Application, but this doesn't seem to work. When I try to call the dll from C#, I just get some error telling me the file doesn'e exists. (I have tried with just a small test project, and that worked fine from C#, but when I do the same thing with my existing console-app, I can't make it work.)&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Is it possible to keep the console application (.exe file), and make it run on a command from C#? I don't have to send input or get output data from the fortan-project, it just have to run. (Input and output are through .txt files anyway...) Or does anyone have any other ideas?&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;(My problems are solved if some nice person could paste someC# code that launches an other .exe-file)&lt;/DIV&gt;</description>
    <pubDate>Fri, 25 Feb 2005 01:17:16 GMT</pubDate>
    <dc:creator>nightfall</dc:creator>
    <dc:date>2005-02-25T01:17:16Z</dc:date>
    <item>
      <title>Problem calling fortran dll from C#</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819656#M46993</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT face="Times New Roman"&gt;Hi&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT face="Times New Roman"&gt;I have a big problem. I am writing a program in fortran-90, and now I need to make a GUI in C#. My problem is that I am not able to make the connection between the two languages. For the record, I am using Visual Studio 2003.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="Times New Roman" size="3"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT face="Times New Roman"&gt;Earlier I have been using the Salford Fortran compiler, and I had no problem connecting to and from C#. I just had to make a dll out of my fortran files, and add a reference to this dll in my C# project. Now I have been forced to change to Intel Fortran Compiler, and I am no longer able to add the reference to the fortran dll. When I try to add the reference to the dll in my C# project, I get this error: A reference to could not be added. This is not a valid assembly or COM component. Only assemblies with extension dll and COM components can be referenced. Please make sure the file is accessible, and that it is a valid assembly or COM component. (If anyone wonder, my file HAS the extension dll, so I really dont understand the error message)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="Times New Roman" size="3"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT face="Times New Roman"&gt;If anyone know anything, please contact me. I really need some help here&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT face="Times New Roman"&gt;Sverre&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Feb 2005 18:57:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819656#M46993</guid>
      <dc:creator>nightfall</dc:creator>
      <dc:date>2005-02-17T18:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calling fortran dll from C#</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819657#M46994</link>
      <description>&lt;DIV&gt;The Salford compiler generates managed code .NET assemblies - Intel Fortran does not. See &lt;A href="http://softwareforums.intel.com/ids/board/message?board.id=5&amp;amp;message.id=10434" target="_blank"&gt;here &lt;/A&gt;for tips on calling unmanaged DLLs from C#.&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Feb 2005 21:56:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819657#M46994</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-02-17T21:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calling fortran dll from C#</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819658#M46995</link>
      <description>&lt;DIV&gt;Thanks, that helped me a lot, but I still have some trubles.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;This is a project where I got about 10.000 lines of pregenerated source code, witch was set up as a .exe-project. I now have problems converting this to an unmanaged dll. My solution now has 2 projects; one Console Application, and one Static Library. I have tried to make a Dynamic-link Library out of the Console Application, but this doesn't seem to work. When I try to call the dll from C#, I just get some error telling me the file doesn'e exists. (I have tried with just a small test project, and that worked fine from C#, but when I do the same thing with my existing console-app, I can't make it work.)&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Is it possible to keep the console application (.exe file), and make it run on a command from C#? I don't have to send input or get output data from the fortan-project, it just have to run. (Input and output are through .txt files anyway...) Or does anyone have any other ideas?&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;(My problems are solved if some nice person could paste someC# code that launches an other .exe-file)&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Feb 2005 01:17:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819658#M46995</guid>
      <dc:creator>nightfall</dc:creator>
      <dc:date>2005-02-25T01:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calling fortran dll from C#</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819659#M46996</link>
      <description>I don't know C#, sorry.</description>
      <pubDate>Fri, 25 Feb 2005 01:42:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819659#M46996</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-02-25T01:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calling fortran dll from C#</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819660#M46997</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Sverre, follow &lt;A href="http://softwareforums.intel.com/ids/board/message?board.id=5&amp;amp;message.id=5387" target="_blank"&gt;this&lt;/A&gt; thread. You may search this forum for C# and find several other threads. But I think that all of them deal with calling a DLL and not an EXE. I don't know C# but I think that you may need some system function in C# for calling an EXE.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Further, I would suggest that you try to debug your fortran code and see which file is missing. I would guess that there is a problem in a call to static library from your DLL.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Sabalan.&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Feb 2005 18:42:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819660#M46997</guid>
      <dc:creator>sabalan</dc:creator>
      <dc:date>2005-02-25T18:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calling fortran dll from C#</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819661#M46998</link>
      <description>Make a default c# console app (ConsoleApplication1) and change the default Class1 to read:&lt;BR /&gt;&lt;BR /&gt;using System;&lt;BR /&gt;&lt;BR /&gt;namespace ConsoleApplication1&lt;BR /&gt;{&lt;BR /&gt;class Class1&lt;BR /&gt;{&lt;BR /&gt;[STAThread]&lt;BR /&gt;static void Main(string[] args)&lt;BR /&gt;{&lt;BR /&gt;System.Diagnostics.Process p=new System.Diagnostics.Process();&lt;BR /&gt;p.StartInfo.FileName = "Sine2D.exe";&lt;BR /&gt;p.Start();&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Build and transfer ConsoleApplication1.exe to&lt;BR /&gt;&lt;BR /&gt;C:Program FilesIntelFortranArrayVisualizersamplesFortranSine2DDebug&lt;BR /&gt;&lt;BR /&gt;after you've built the Sine2D sample.&lt;BR /&gt;&lt;BR /&gt;Now 2-click ConsoleApplication1.exe and see Sine2D.exe run.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Gerry T.</description>
      <pubDate>Sat, 26 Feb 2005 04:54:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-calling-fortran-dll-from-C/m-p/819661#M46998</guid>
      <dc:creator>g_f_thomas</dc:creator>
      <dc:date>2005-02-26T04:54:45Z</dc:date>
    </item>
  </channel>
</rss>

