bonjour
j'ai ecrit un DLL programme en utilisant stdcall je l'ai compile ,il y a eu aucune faute.
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
extern "C" __declspec( dllexport ) int _stdcall f1(int a , int b);
BOOL WINAPI DllMain(HINSTANCE Hinstance,DWORD Reason,LPVOID Reserved)
{
return TRUE;
}
int _stdcall f1(int a , int b )
{
int summe = a + b ;
return summe;
}
mais si j'appelle cet DLL avec ce source code :
#include "stdafx.h"
#include <windows.h>
#include <iostream>
int __stdcall f1(int a , int b );
using namespace std;
int main()
{
int resultat = f1(1,2);
cout<<"Resultat : "<<resultat<<endl;
system("pause");
return 0;
}
je recois 2 erreures :
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""int __stdcall f1(int,int)" (?f1@@YGHHH@Z)" in Funktion "_main".
fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
est ce que quelqu'un peut m'aider.
merci