Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. importing fortran dll's

importing fortran dll's

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharpcomtutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alankrita
    wrote on last edited by
    #1

    Hi, Thank you all for ur answers.I tried working it out but there still is some problem.I tried the dllimport method but i still have an error saying that the entry point has not been found.this was using salford fortran .i was just wondering if all fortran compilers are compatible with .net platform.when i used the intel fortran 8.0 compiler i was not able to reference the fortran dll as well.the error was that it is not a valid dll or com object.i guess it cudnt recognise the dll.is there anything i can do to get it right?? the dllimport code i used was _ Public Shared Sub xyz(ByRef x As Integer) End Sub call xyz(x) and in the fotran dll i wrote the following subroutine Dll2(x) x=x+1 ! Expose subroutine Dll2 to users of this DLL ! !DEC$ ATTRIBUTES DLLEXPORT::Dll2 !MS$ATTRIBUTES REFERENCE :: x end subroutine Dll2 this is just an example i was trying to get right. i need to get it right soon. thank u for ur help

    P 1 Reply Last reply
    0
    • A alankrita

      Hi, Thank you all for ur answers.I tried working it out but there still is some problem.I tried the dllimport method but i still have an error saying that the entry point has not been found.this was using salford fortran .i was just wondering if all fortran compilers are compatible with .net platform.when i used the intel fortran 8.0 compiler i was not able to reference the fortran dll as well.the error was that it is not a valid dll or com object.i guess it cudnt recognise the dll.is there anything i can do to get it right?? the dllimport code i used was _ Public Shared Sub xyz(ByRef x As Integer) End Sub call xyz(x) and in the fotran dll i wrote the following subroutine Dll2(x) x=x+1 ! Expose subroutine Dll2 to users of this DLL ! !DEC$ ATTRIBUTES DLLEXPORT::Dll2 !MS$ATTRIBUTES REFERENCE :: x end subroutine Dll2 this is just an example i was trying to get right. i need to get it right soon. thank u for ur help

      P Offline
      P Offline
      progload
      wrote on last edited by
      #2

      You should check Salfords Site: http://www.salfordsoftware.co.uk/kb/SKB146 Calling routines in object files/DLLs created by other compilers This applies to: Salford C/C++ DBOS Salford C/C++ Win32 Salford FTN77 DBOS Salford FTN77 Win32 Salford FTN90 DBOS Salford FTN90 Win32 Salford FTN95 DBOS Salford FTN95 for Visual Studio .NET Salford FTN95 Win32 Question Is it possible to call routines in object files/DLLs created by other compilers? Answer Yes using C_EXTERNAL or STDCALL. See the Mixed Language Programming section in the User Guide. -------------------------------------------------------------------------------- THE INFORMATION IN THIS DOCUMENT IS PROVIDED ON AN AS-IS BASIS WITHOUT WARRANTY OF ANY KIND. PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, SPECIAL OR INCIDENTAL DAMAGES, EVEN IF PROVIDER HAS BEEN ADVISED BY USER OF THE POSSIBILITY OF SUCH POTENTIAL LOSS OR DAMAGE. USER AGREES TO HOLD PROVIDER HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, LOSSES, LIABILITIES AND EXPENSES. Document ID: SKB0146 Published on: 12 Feb 2004

      A 1 Reply Last reply
      0
      • P progload

        You should check Salfords Site: http://www.salfordsoftware.co.uk/kb/SKB146 Calling routines in object files/DLLs created by other compilers This applies to: Salford C/C++ DBOS Salford C/C++ Win32 Salford FTN77 DBOS Salford FTN77 Win32 Salford FTN90 DBOS Salford FTN90 Win32 Salford FTN95 DBOS Salford FTN95 for Visual Studio .NET Salford FTN95 Win32 Question Is it possible to call routines in object files/DLLs created by other compilers? Answer Yes using C_EXTERNAL or STDCALL. See the Mixed Language Programming section in the User Guide. -------------------------------------------------------------------------------- THE INFORMATION IN THIS DOCUMENT IS PROVIDED ON AN AS-IS BASIS WITHOUT WARRANTY OF ANY KIND. PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, SPECIAL OR INCIDENTAL DAMAGES, EVEN IF PROVIDER HAS BEEN ADVISED BY USER OF THE POSSIBILITY OF SUCH POTENTIAL LOSS OR DAMAGE. USER AGREES TO HOLD PROVIDER HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, LOSSES, LIABILITIES AND EXPENSES. Document ID: SKB0146 Published on: 12 Feb 2004

        A Offline
        A Offline
        alankrita
        wrote on last edited by
        #3

        Hi, I am using the intel fortran 8.0 compiler.When i run the vb.net application,I get an error saying System.DllNotFOundException and that it is unable to load the dll.When i tried referencing the fortran dll from vb.net the error was that it is not a valid dll or com object.is there some configurations that i need to set before trying to import the dll. Thank u

        P 1 Reply Last reply
        0
        • A alankrita

          Hi, I am using the intel fortran 8.0 compiler.When i run the vb.net application,I get an error saying System.DllNotFOundException and that it is unable to load the dll.When i tried referencing the fortran dll from vb.net the error was that it is not a valid dll or com object.is there some configurations that i need to set before trying to import the dll. Thank u

          P Offline
          P Offline
          progload
          wrote on last edited by
          #4

          Your post said: "this was using salford fortran" You may have better luck with your question here: Intel® Fortran Compiler for Windows & Visual Fortran Forum http://softwareforums.intel.com/ids/board?board.id=5 I did find this in the intel documentation: DLL mismatch issue When you run an executable application built with Intel Visual Fortran, an "entry point not found in LIBMMD.DLL" error (the DLL name may also be LIBMMDD.DLL) may occur under the following circumstances: if You have both Intel Visual Fortran Compiler 8.0 and version 7.0 or 7.1 of Intel Fortran Compiler or Intel C++ Compiler installed on the same system if The program is built to use the DLL form of the run-time libraries This error is due to an inconsistency between the math library DLLs provided with Intel 7.0 or 7.1 compilers and those provided with the version 8.0 compilers. Depending on the order of installation, the path searched for the DLL may cause the other version's DLL to be used. The workaround to this problem is to copy the DLL named in the error message from the appropriate version's BIN folder (either Program Files\Intel\Compiler70\bin or Program Files\Intel\Fortran\Compiler80\bin) into the same folder as the EXE you are running. This problem may be resolved in a future update to the compiler. I hope this helps, progload

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups