1 Attachment(s)
unresolved Externals in a dll
Well again I don't have a clue. :confused:
I'm trying to export some functions from a dll into my app, but I am getting these errors:
key32.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __stdcall InitHooksDll(struct HWND__ *,int)" (__imp_?InitHooksDll@@YGHPAUHWND__@@H@Z)
key32.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __stdcall PaintHooksDll(struct HDC__ *)" (__imp_?PaintHooksDll@@YGHPAUHDC__@@@Z)
key32.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __stdcall InstallFilter(int,int)" (__imp_?InstallFilter@@YGHHH@Z)
could somebody explain why i get them and how to solve them?! I'm pretty lost to tell the truth! and the help provided by msdn and the likes is not the greatest for a beginer like myself!
I've enclosed my code, you have to run it from the d:\development\key32\ directory as there are includes with path statements!! (is there anyway round this type of include statement? i.e. #include "d:\development....\key32.h"
Cheers in advance
Andy:rolleyes:
??? i thought i had done that
I thought i had already put that stuff in:
#ifndef __KEYDLL_H__
#define __KEYDLL_H__
#include <windows.h>
#ifdef _DLL_INTERNAL_
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
int DLLEXPORT WINAPI InitHooksDll(HWND hwndMainWindow, int nWinLineHeight);
int DLLEXPORT WINAPI PaintHooksDll(HDC hDC );
int DLLEXPORT WINAPI InstallFilter (int nHookIndex, int nCode );
char DLLEXPORT *szMessageString(int ID);
#endif // __KEYDLL_H__
do i need to put it somewhere else in my code as well?:confused: