问题
I am trying to create a add for this driver https://github.com/robot9706/VirtualCameraDriver but I am getting below errors Please tell me if something specific is required and how to add it to Binding.gyp for DirectX based on https://groups.google.com/forum/#!topic/microsoft.public.win32.programmer.directx.video/XLaqyQt-krw
DeviceEnumeration.obj : error LNK2001: unresolved external symbol IID_IBaseFilter [C:\Users\Downloads\blog-addons-example-master\build\testaddon.vcxproj] DeviceEnumeration.obj : error LNK2001: unresolved external symbol CLSID_SystemDeviceEnum [C:\Users\Downloads\blog-addons-example-master\build\testaddon.vcxproj] DeviceEnumeration.obj : error LNK2001: unresolved external symbol CLSID_VideoInputDeviceCategory [C:\Users\Downloads\blog-addons-example-master\build\testaddon.vcxproj] C:\Users\Downloads\blog-addons-example-master\build\Release\testaddon.node : fatal error LNK1120: 3 unresolved externals [C:\Users\Downloads\blog-addons-example -master\build\testaddon.vcxproj]
my Bindings.gyp
{
"targets": [{
"target_name": "testaddon",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"sources": [
"cppsrc/Samples/Device.cpp",
"cppsrc/Samples/DeviceEnumeration.cpp",
"cppsrc/Samples/dllmain.cpp",
"cppsrc/Samples/DriverInterface.cpp"
],
'conditions': [
['OS=="win"', {
'defines+': [
'WIN_DEFINE',
'INCLUDE_SIGNATURE_ENCRYPTION',
'WIN64',
'WIN32',
'_WIN32',
"_WIN32_WINNT=0x0601",
"_WINSOCK_DEPRECATED_NO_WARNINGS",
"_HAS_EXCEPTIONS=2",
"_SCL_SECURE_NO_WARNINGS",
"UNICODE",
"_UNICODE",
"_NO_ASYNCRTIMP",
"BOOST_ERROR_CODE_HEADER_ONLY"
],
'msbuild_toolset': 'v142',
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': '1', # /EHsc
},
},
# "run_as": {
# "action": ['C:/Program Files/nodejs/node.exe', '$(ProjectDir)/../../out/encrypt.js', ],
# },
"configurations": {
"Debug": {
'defines': [
'DEBUG',
'_DEBUG'
],
'library_dirs': [
],
},
"Release": {
'defines': [
'NDEBUG',
],
'library_dirs': [
],
}
},
}]
],
}]
}
来源:https://stackoverflow.com/questions/62759776/angular-c-add-on-errors-for-a-virtual-driver