Hi,
I am new to C++ .NET programming, i am trying to import a Fortran dll to my existing windows forms project (VS2010, C++)
I was able to build the solution successfully, but whenever i try to run the application it gives me below error.
"This application has failed to start because .dll was not found. Re-installing the application may fix the problem "
Steps i have followed to connect to a Fortran dll :
1. Created a sample Fortran project and generated the dll and lib files.
(Used below line to generate the lib file)
!DEC$ ATTRIBUTES DLLEXPORT::FR1
2. Added a sample Windows Forms project (C++), I gave the Fortran dll path in the linker - > Additional library dependencies as follows
C:\SampleSolution\FortranPrjct\Debug\
Also, added the library (.lib) name in Input -> Additional dependencies
3. Finally, I have added below line to my form and tried to access the method.
extern "C" {void Test(int *N,int *M);}
The Solution builds successfully, but it says unable to locate the dll when i try run.
Any help would be highly appreciated.
Thanks!!