March 23rd, 2003, 02:18 PM
How can I call external DLL from ‘Win32 Console App’?
March 25th, 2003, 12:59 AM
August 22nd, 2003, 01:01 PM
When I build my DLL , it requires a couple of files , say 1.h 2.h ..., to be included.These are listed as External Dependencies.This part is fine and I can build my Dll .
Now when I get to the point of using the DLL in a project , I get errors like :
error LNK2001: unresolved external symbol _htTraceInit
These symbols I can trace to those files which were included as "External Dependencies" while building the DLL.
Why do these errors occur , even though I include the files in question (1.h) in the project that is using the DLL.
Do the functions in files under external dependencies have to be exported too?
August 23rd, 2003, 01:37 AM
To call the function of the dll from outside you need to export the fuctions using the keyword
_declspec(dllexport).This is also applicable when you want to use the global variables declared in the dll from outside