Ops, and now this file :o)
I do not know C#, but I do know that if you want a Fortran program to call a function in a DLL, then
a) you must make the function or symbol for the function visible to users of the DLL, and
b) In your Fortran code, you must use the correct symbol for the function you wish to access in the DLL, possibly using a compiler flag such as ALIAS, and
c) In your Fortran code, you must mark that symbol as to be IMPORTED from a dll using a compiler flag such as DLLIMPORT,
d) You must also, in your Fortran, ensure that the calling convention agrees with the C# one (e.g. are the arguments supplied by value or reference (i.e. address)
In your C# code,
using System;
using System.Windows.Forms;
namespace prijimac
{
public class Class1
{
public static void ShowNumber(int a, int b)
{
MessageBox.Show("a=" + a.ToString()+ " b=" + b.ToString());
}
}
}
There are no symbols exported, correct?. Thus, as far as I can see from your zipped archive, there is no export library (.LIB) of symbols generated and supplied along with your C# DLL, so there is no way for your Fortran program to be given the details as to what and where are the symbols that you wish to reference in your Fortran code (normally you would include the .LIB in your Fortran project to do this). This shortcoming has to be rectified first before you stand a chance of calling functions in your DLL, IMO.