Author Topic: Can you use a DLL written in Fortran (or other languages than C/C++)?  (Read 601 times)

Offline JohnnyB

  • Mc. Print
  • *
  • Posts: 25
    • View Profile
I am not sure at the moment how this "INLINE" stuff really works.

Offline Snoopy

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile

Offline JohnnyB

  • Mc. Print
  • *
  • Posts: 25
    • View Profile

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 288
    • View Profile
    • my personal website
It doesn't matter what programming language was used to make dll file, only what matters it that it should export functions with 'stdcall' calling convention, also 'cdecl' is supported without problems. (info about calling conventions: https://en.wikipedia.org/wiki/X86_calling_conventions) You can use DECLARE keyword to make direct use of dll functions in your code: http://www.glbasic.com/xmlhelp.php?lang=en&id=191&action=view
If you encounter problem with some specific dll and function just ask. GLB code is translated to c++, then compiled (so it doesn't have limitations present on other such tools), you can write direct c++ code to make use of some specific things not available directly on GLB itself ;)
Check my source code editor for GLBasic - link

Offline JohnnyB

  • Mc. Print
  • *
  • Posts: 25
    • View Profile
That's good. I will use C++ or Fortran for complex calculations for my AI.

Offline Snoopy

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile
Woah!, I just realized that it's my message with Obama's "Can you do it? ... Yes, you can!!!" that made me go from "Mr. Polyvector" to "Dr. Type" :D
It's cool!  :good: