- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I have Compaq Fortran running on a Windows XP machine where I can compile a DLL from Fortran code. I then call this DLL from VB 6 and VB.net without problems. I include dforrt.dll in the directory where the VB project exists.
Below I created a very simple Intel Fortran DLL, which when I try to call from VB.net I get an error message that the DLL cannot be found.
Could you please tell me what I would need to do in order to create a Fortran DLL that can be called from VB.net?
Note: I am a novice programmer.
subroutine TEST(cal,outp)
!DEC$ ATTRIBUTES DLLEXPORT, ALIAS: 'TEST'::TEST
implicit double precision (a-h,o-z)
implicit integer (i-n)
outp=dexp(cal)
RETURN
END
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
He's using CVF. I think the command would be:
df /dll fdll.f90
If the Fortran DLL was not going to be called from Fortran, you could link statically and eliminate the need for dforrt,dll:
df /libs:static /dll fdll.f90
We weren't shown how the routine is declared in VB6, but I'll comment that VB will say "DLL not found" for ANY kind of error it gets loading the DLL
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
He's using CVF. I think the command would be:
df /dll fdll.f90
If the Fortran DLL was not going to be called from Fortran, you could link statically and eliminate the need for dforrt,dll:
df /libs:static /dll fdll.f90
We weren't shown how the routine is declared in VB6, but I'll comment that VB will say "DLL not found" for ANY kind of error it gets loading the DLL
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Steve wrote:
I have Compaq Fortran running on a Windows XP machine where I can compile a DLL from Fortran code. I then call this DLL from VB 6 and VB.net without problems. I include dforrt.dll in the directory where the VB project exists.
Below I created a very simple Intel Fortran DLL, which when I try to call from VB.net I get an error message that the DLL cannot be found.
Could you please tell me what I would need to do in order to create a Fortran DLL that can be called from VB.net?
...
"DLL not found" errors are very often due to some DLL dependencies that are missing on the path. In your case, you may have run-time dependencies (similar to dforrt.dll with Compaq Fortran) for which you may need to take extra steps. Take a look at these topics: https://software.intel.com/en-us/forums/topic/275632, https://software.intel.com/en-us/forums/topic/533439, and https://software.intel.com/en-us/forums/topic/506625.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Steve Lionel (Intel) wrote:
He's using CVF.
He was using CVF without problems, and is now trying the same with IFort, but has problems.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Steve wrote:
..
Below I created a very simple Intel Fortran DLL, which when I try to call from VB.net I get an error message that the DLL cannot be found.
Could you please tell me what I would need to do in order to create a Fortran DLL that can be called from VB.net?
..
Steve (OP on this topic),
Do you have Microsoft Visual Studio, something other than the Express edition or the shell? If so, you can also take a look at a fully-worked out example of a VB .NET program calling a Fortran DLL in Quote #2 at this topic: https://software.intel.com/en-us/forums/topic/509148.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thank you to Steve, mecej4, and FortranFan. As I said, I am a novice, but with your various comments/help I have resolved my problej. I have used Visual Studio 2005 and have used the library Debug Multithreaded (/libs:static /threads /dbglibs)
