I have a DLL and I would like to use some of its functions.
#include <iostream>
using namespace std;
extern "C" __declspec(dllimport) int Initialize(char* localPort, char* adminServerName, int rpcTimeout);
int main()
{
int res = Initialize("7864", "6000@kabc", 10000);
return 0;
}
I don't have the DLL's .lib file, so is there anyway I can link to it. One thing that comes to my mind is to use the LoadLibrary function and then use the GetProcAddress(). Is there any other way?
When I compile the following code
error LNK2019: unresolved external symbol _imp_Initialize referenced in function _main
fatal error LNK1120: 1 unresolved externals
I get the above errors
I'm using Windows and Visual Studio 2008