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
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.
BruNews
Messages postés21040Date d'inscriptionjeudi 23 janvier 2003StatutModérateurDernière intervention21 août 2019 1 déc. 2008 à 15:29
Le contraire, c'est A REMETTRE. Une DLL doit toujours exporter avec déco standard C des fonctions sinon ne sera employable QUE avec exe fait par le même compilo.