- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi..
I am calling a Fortran routing in a fortran file named TRIANGLE.F
the code i used to call the fortran routine is as follows
#include
#include
extern "C"
{
void __stdcall TRIANGLE();
}
{
void __stdcall TRIANGLE();
}
void main()
{
TRIANGLE();
}
{
TRIANGLE();
}
I am not sure whether this code would be sufficient..i created a dll of the fortran file and added it to the project..also i added the dfor.lib to the link in the project/settings.
The errors that i am getting are run time errors and not any compile time errors. They are..
Linking...
cfort.obj : error LNK2001: unresolved external symbol _TRIANGLE@0
Debug/attempt5.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
cfort.obj : error LNK2001: unresolved external symbol _TRIANGLE@0
Debug/attempt5.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
could someone help me and explain me or provide me with links where i can learn to fix the problems..
Thanks in advance..
Raghavendher Thimmana
コピーされたリンク
3 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You need to add the .lib created when you built the DLL, not the DLL itself. The DLL is not used in the linking process.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
thanks steve.
well i was able to successfully call the fortran program from a C++ in the Visual Studio interface. Asu said i had to add the .obj file to the project.
I have another question..
I was able to run the program with Visual Studio 6.0 and Fortran 95(Compaq Visual Fortran)
However i need to implement the same on another system with Visual Studio.Net and Fortran 77.
the program is compiling but a runtime error pops up saying that dforrt.dll was not found. I was trying to find a copy of the dll online..but is the dll available only with the Fortran 95 version..?? how can i get the dll. do i need to install the fortran 95 on the system i have to implement the program..??
Thanks in advance..
raghavendher thimmana
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Go to http://www.compaq.com/fortran/visual/redist.html Download the package there and install it on the other machine.