hum.... ou alors tu trouves le .lib et le .h correspondant...
par ici par exemple ...
[ Lien ]tu copies les fichiers k8055D_C.h k8055D_C.lib et k8055D_C.dll dans le repertoire de ton application
Dans code::Blocks, une fois que t'as cree ton projet, tu vas dans [project]->[build options]->[linker settings]
A gauche tu selectiones "DEBUG" et tu cliques sur [ADD]
tu rentres "./K8055D_C.lib"
tu fais la meme chose mais en selectionnant "RELEASE"
Ca y est ta DLL est "liee" a ton application
Pour utiliser les fonctions dans ton programme, il te "suffit" d'inclure le fichier K8055D_C.h
#include "K8055D_C.h"
sauf que apparament, pour Microsoft et pour Borland, le type bool fait parti du standard C (a bon!) et que le type par defaut est void et pas int
Comme moi gcc me faisait chier a la compiler j'ai modifie le fichier .h comme ca
#ifdef __cplusplus
extern "C" {
#endif
#define FUNCTION __declspec(dllexport)
FUNCTION long __stdcall OpenDevice(long CardAddress);
FUNCTION void __stdcall CloseDevice();
FUNCTION long __stdcall ReadAnalogChannel(long Channel);
FUNCTION void __stdcall ReadAllAnalog(long *Data1, long *Data2);
FUNCTION void __stdcall OutputAnalogChannel(long Channel, long Data);
FUNCTION void __stdcall OutputAllAnalog(long Data1, long Data2);
FUNCTION void __stdcall ClearAnalogChannel(long Channel);
FUNCTION void __stdcall ClearAllAnalog();
FUNCTION void __stdcall SetAnalogChannel(long Channel);
FUNCTION void __stdcall SetAllAnalog();
FUNCTION void __stdcall WriteAllDigital(long Data);
FUNCTION void __stdcall ClearDigitalChannel(long Channel);
FUNCTION void __stdcall ClearAllDigital();
FUNCTION void __stdcall SetDigitalChannel(long Channel);
FUNCTION void __stdcall SetAllDigital();
FUNCTION int __stdcall ReadDigitalChannel(long Channel);
FUNCTION long __stdcall ReadAllDigital();
FUNCTION long __stdcall ReadCounter(long CounterNr);
FUNCTION void __stdcall ResetCounter(long CounterNr);
FUNCTION void __stdcall SetCounterDebounceTime(long CounterNr, long DebounceTime);
FUNCTION void __stdcall Version();
FUNCTION long __stdcall SearchDevices();
FUNCTION long __stdcall SetCurrentDevice(long lngCardAddress);
#ifdef __cplusplus
}
#endif
Sinon... tu peux toujours utiliser LoadLibreary et GetProcAddress xD