LInker error 1120 followed by 2001



I've a MFC Dll from where I'm trying to export certain functions. These functions have been exported in the form :
1
2
BOOL WINAPI ProcessIdle();
BOOL WINAPI someFunc();


in the header file and the implementation in the .cpp file.

Header File
1
2
3
4
5
6
7
8
9
10
11
#ifdef __cplusplus
extern "C" {
#endif  /* __cplusplus */

BOOL WINAPI CreateDialoge(HWND hWndParent);
BOOL WINAPI FilterDllMsg(LPMSG lpMsg);
void WINAPI ProcessDllIdle();
BOOL WINAPI someFunc();
#ifdef __cplusplus
}
#endif 


.def File

1
2
3
4
5
6
EXPORTS
    ; Explicit exports can go here
    CreateDialoge                @2
    FilterDllMsg                 @4
    ProcessDllIdle               @5
    someFunc                     @6 


These functions have also been defined in the .def file

When the DLL is created, I can see via dependencyWalker that the function, someFunc(), is indeed being exported.

Unfortunately, my application, where I'm trying to reference the function, reports a LNK1120 followed by LNK2001 error.

I do not understand, because another exported function, ProcessIdle(), works fine, my own function, someFunc(), does not.

I've tried replacing the call, WINAPI,with _stdcall, and even __declspec (dllexport), but to no avail.

The Linker error is 1120, followed by :

Error 2001 : Unresolved external symbol _someFunc@0

Kindly advise.
When you import, it needs __declspec(dllimport)
Where should I put it, please? If I put it in the place where it needs to be used, it gives an error, and why don't the other functions need this? They seem to work fine without the import?
Topic archived. No new replies allowed.