Sounds like a simple case of not linking against the right library:
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-reporteventa Library Advapi32.lib DLL Advapi32.dll Should be as simple as adding advapi32 to your libs directive.