Salut à tous,
Je suis en train de programmer une petite DLL, et je voudrais tester les quelques methodes avant d'aller trop loin.
Pour cela, j'ai créer un projet "Win32 Console Application" dans lequel je fais appel aux methodes dans la DLL.
J'ai juste fait un include de DLLCodec.h qui contient:
#ifdef DLLCODEC_EXPORTS
#define DLLCODEC_API __declspec(dllexport)
#else
#define DLLCODEC_API __declspec(dllimport)
#endif
#include "Types.h"
#include "Constantes.h"
#include "Message.h"
#include "CmdGenerique.h"
#include "CmdRs232.h"
#include "CmdAtpQt.h"
#include "CmdInterne.h"
extern DLLCODEC_API int nDLLCoDec;
// Interface : méthodes exportées
DLLCODEC_API CMessage *encode(const TCmdAtpQt &p_commande);
DLLCODEC_API CMessage *encode(const TCmdInterne &p_commande);
DLLCODEC_API CMessage *encode(const TCmdRs232 &p_commande);
//DLLCODEC_API TInfoCoDec decode( const CMessage &p_message, TCmdGenerique *p_commande );
DLLCODEC_API TCmdGenerique *decode( CMessage *p_message );
// Méthodes internes
u_char *AsciiToBin( const u_char *p_donneeAscii );
void addSeparateur(u_char *p_strData, u_short *p_dataLen);
Mais j'ai les erreurs suivantes:
--------------------Configuration: TestDLLCoDec - Win32 Debug--------------------
Compiling...
Command line warning D4002 : ignoring unknown option '/c '
TestDLLCoDec.cpp
TestDLLCoDec.obj : error LNK2001: unresolved external symbol "public: __thiscall TCmdAtpQt::~TCmdAtpQt(void)" (??1TCmdAtpQt@@QAE@XZ)
TestDLLCoDec.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class TCmdGenerique * __cdecl decode(class CMessage *)" (__imp_?decode@@YAPAVTCmdGenerique@@PAVCMessage@@@Z)
TestDLLCoDec.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class CMessage * __cdecl encode(class TCmdAtpQt const &)" (__imp_?encode@@YAPAVCMessage@@ABVTCmdAtpQt@@@Z)
TestDLLCoDec.obj : error LNK2001: unresolved external symbol "public: __thiscall CMessage::CMessage(void)" (??0CMessage@@QAE@XZ)
TestDLLCoDec.obj : error LNK2001: unresolved external symbol "public: void __thiscall TCmdAtpQt::setLsb(unsigned long)" (?setLsb@TCmdAtpQt@@QAEXK@Z)
TestDLLCoDec.obj : error LNK2001: unresolved external symbol "public: void __thiscall TCmdAtpQt::setMsb(unsigned long)" (?setMsb@TCmdAtpQt@@QAEXK@Z)
TestDLLCoDec.obj : error LNK2001: unresolved external symbol "public: __thiscall TCmdAtpQt::TCmdAtpQt(void)" (??0TCmdAtpQt@@QAE@XZ)
TestDLLCoDec.exe : fatal error LNK1120: 7 unresolved externals
Error executing cl.exe.
TestDLLCoDec.exe - 8 error(s), 1 warning(s)
Quelqu'un peut il m'aider?
Merci