B
bobnotbob
I have created an application and am trying to call functions from a
previously existing dll. I can call some functions fine, but I get a
link error an when I try to call any function that takes either an
LPCTSTR or wchar_tas a parameter.
I am using C++ and Visual Studio .NET.
Here's two functions that cause me problems:
void CADAPICALL JuncFunc9(LPCTSTR aaa);
void CADAPICALL JuncFunc10( wchar_t * aaa);
(CADAPICALL is defined as __declspec(dllexport) or
__declspec(dllimport))
Here's the errors I get:
InspectionPlanner error LNK2019: unresolved external symbol
"__declspec(dllimport) void __cdecl JuncFunc10(wchar_t *)"
(__imp_?JuncFunc10@@YAXPA_W@Z)
InspectionPlanner error LNK2019: unresolved external symbol
"__declspec(dllimport) void __cdecl JuncFunc9(char const *)"
(__imp_?JuncFunc9@@YAXPBD@Z)
I thought that maybe the problem is that the dll uses unicode, so I
converted my application to a unicode app by defining _UNICODE and
UNICODE in the project and adding the entry point wWinMainCRTStartup,
but I still got almost the exact same errors, except that LPCTSTR was
converted to "const wchar_t *" instead of "const char *"
Does anybody have any ideas what else might be causing these linking
problems?
previously existing dll. I can call some functions fine, but I get a
link error an when I try to call any function that takes either an
LPCTSTR or wchar_tas a parameter.
I am using C++ and Visual Studio .NET.
Here's two functions that cause me problems:
void CADAPICALL JuncFunc9(LPCTSTR aaa);
void CADAPICALL JuncFunc10( wchar_t * aaa);
(CADAPICALL is defined as __declspec(dllexport) or
__declspec(dllimport))
Here's the errors I get:
InspectionPlanner error LNK2019: unresolved external symbol
"__declspec(dllimport) void __cdecl JuncFunc10(wchar_t *)"
(__imp_?JuncFunc10@@YAXPA_W@Z)
InspectionPlanner error LNK2019: unresolved external symbol
"__declspec(dllimport) void __cdecl JuncFunc9(char const *)"
(__imp_?JuncFunc9@@YAXPBD@Z)
I thought that maybe the problem is that the dll uses unicode, so I
converted my application to a unicode app by defining _UNICODE and
UNICODE in the project and adding the entry point wWinMainCRTStartup,
but I still got almost the exact same errors, except that LPCTSTR was
converted to "const wchar_t *" instead of "const char *"
Does anybody have any ideas what else might be causing these linking
problems?