Reputation: 133
Sorry for bad english, use Google.translate trying to include OpenSSL to project (DLL) for VS2012. 1. downloaded the installer(Win32 OpenSSL v1.0.1g, 16mb) and installed. 2. build project 3. and get an error
1>libeay32MDd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "__imp__GetUserObjectInformationW@20"
1>libeay32MDd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "__imp__GetProcessWindowStation@0"
1>libeay32MDd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "__imp__GetDesktopWindow@0"
1>libeay32MDd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "__imp__MessageBoxA@16"
1>libeay32MDd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "__imp__DeregisterEventSource@4"
1>libeay32MDd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "__imp__ReportEventA@36"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__DeleteDC@4"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__DeleteObject@4"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__GetBitmapBits@12"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__BitBlt@36"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__GetObjectA@12"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__SelectObject@8"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__CreateCompatibleBitmap@12"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__GetDeviceCaps@8"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__CreateCompatibleDC@4"
1>libeay32MDd.lib(rand_win.obj) : error LNK2001: unresolved external symbol "__imp__CreateDCA@16"
Link Library
#pragma comment(lib, "ssleay32xx.lib")
#pragma comment(lib, "libeay32xx.lib")
I tried different versions of libraries, just changed the /MT to /MD. Library is connected, as a function call
CMS_sign(&signcert,&pkey,&certs,&data,NULL);
does not lead to error. judging by the names of the functions are standard functions Windows.
Upvotes: 2
Views: 1922
Reputation: 133
resolve problem
#pragma comment(lib, "User32.lib")
#pragma comment(lib, "GDI32.lib")
#pragma comment(lib, "Advapi32.lib")
Upvotes: 7