Calling a DLL FORTRAN with C++

Calling a DLL FORTRAN with C++

Jugoslav, I've done a C++ program with your indications, but I obtain the next error

--------------------Configuration: Call_C - Win32 Debug--------------------
Linking...
main.obj : error LNK2001: unresolved external symbol __imp__suma_int@8
Debug/Call_C.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Call_C.exe - 2 error(s), 0 warning(s)

I've included mydll.lib in Project->Settings->Link->Category->Input->Object/library modules. I show you C++ code

#include
#include

extern "C" __declspec(dllimport) short __stdcall suma_int(short* a,short* b);

void main ()
{
short suma;
short a,b;

a=1;
b=3;

suma=suma_int(&a,&b);
}

Thanks Jugoslav

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.