AndersBillLinden
New Member
Here is what I tried:
* Start vs2022
* Click File -> new project
* Select Dynamic-Link Library (DLL) C++ project with any name
* Copy libobs and libobs-winnt folders from https://github.com/obsproject/obs-studio into project dir using windows explorer
* Right click project in Solution Explorer, click properties and in Configuration Properties -> Include Directories append ;libobs;libobs-winnt
* First "Show All Files" in solution explorer so I see the folder structure, then right click the libobs folder and "Include in project"
* In visual studio add to dllmain.cpp so it reads:
Both blog and LOG_INFO are missing here.
Why?
* Start vs2022
* Click File -> new project
* Select Dynamic-Link Library (DLL) C++ project with any name
* Copy libobs and libobs-winnt folders from https://github.com/obsproject/obs-studio into project dir using windows explorer
* Right click project in Solution Explorer, click properties and in Configuration Properties -> Include Directories append ;libobs;libobs-winnt
* First "Show All Files" in solution explorer so I see the folder structure, then right click the libobs folder and "Include in project"
* In visual studio add to dllmain.cpp so it reads:
Code:
#include "pch.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
__declspec(dllexport) bool obs_module_load(void)
{
blog(LOG_INFO, "plugin loaded successfully");
return true;
}
Why?