Bloodshed Dev-C++ und CMD5
-
Siehe auch hier: Ich habe die
md5class.h
in einem DLL-Projekt eingebunden, sogar alle Dateien einfach in den Projektordner kopiert, auch schon die ganzen cpp-Dateien dem Projekt zugeordnet usw., doch auch hier erhalte ich (sogar mehrfach) folgende Fehlermeldungen:[Linker error] undefined reference to `CMD5::CMD5()' [Linker error] undefined reference to `CMD5::~CMD5()'
dll.h
:#ifndef _DLL_H_ #define _DLL_H_ #if BUILDING_DLL # define DLLIMPORT __declspec (dllexport) #else /* Not BUILDING_DLL */ # define DLLIMPORT __declspec (dllimport) #endif /* Not BUILDING_DLL */ #include "md5class.h" class DLLIMPORT DllClass { public: DllClass(); virtual ~DllClass(void); char* getMD5(char* s); private: CMD5 md5; }; #endif /* _DLL_H_ */
dllmain.cpp
:/* Replace "dll.h" with the name of your header */ #include "dll.h" #include <windows.h> DllClass::DllClass() { } DllClass::~DllClass () { } char* DllClass::getMD5(char* s) { md5.setPlainText(s); return (char*)md5.getMD5Digest(); } BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ , DWORD reason /* Reason this function is being called. */ , LPVOID reserved /* Not used. */ ) { switch (reason) { case DLL_PROCESS_ATTACH: break; case DLL_PROCESS_DETACH: break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; } /* Returns TRUE on success, FALSE on failure */ return TRUE; }
Was mache ich denn falsch?
E: Ich merke gerade, das scheint hier falsch platziert zu sein. Kann das mal bitte jemand in die richtige Kategorie verschieben? Danke.