I have a Visual Studio 2017 Community Edition. Started the new C++ console project. Marked the class I want exported as DLL with __declspec(dllexport).
But when I build my solution, I only get files with following extensions: .exe, .iobj, .ipdb and .pdb.
I tried searching through various settings in Visual Studiom including configuration manager, but I can't find where to enable the option to build the code as DLL. Is it maybe not a part of community edition?
I have not VS community available right now, but IIRC, in the General
project settings, you can select Dynamic Library
as the Configuration Type
You may also want to set Map Exports
and Generate Map File
to Yes
or something like that, in the linker Debugging
settings.
You probably will also need a
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
//you should keep hinstDll in a global variable
//...
return true;// true means "go on with loading the dll"
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.