节点-gyp:"..srcbinding.cc: no such file or directory"



我偶然发现了"…srcbinding。Cc:没有这样的文件或目录"当使用电子生成器构建电子应用程序时。日志:

⨯ node-gyp.cmd exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
Warning: Missing input files:
C:Users%user%sourcereposelectronvueappbuild..srcbinding.cc
�믮������ ��᫥����⥫쭠� ᡮઠ �஥�⮢ � �⮬ �襭��. �⮡� ������� ��ࠫ������ ᡮ��, ������� ��ࠬ��� "-m".
binding.cc
c1xx : fatal error C1083: �� 㤠���� ������ 䠩� ���筨�: ..srcbinding.cc: No such file or directory, [C:Users%user%sourcereposelectronvueappbuildbinding.vcxproj]

谷歌给我的大多数结果都与这里引用的相似:"node-gyp build"致命错误C1083

常见的解决方案是创建一个空的"绑定"。路径,但我的问题是,每次我试图构建应用程序,它只是删除"文件夹并创建一个新文件夹,但是没有"binding.cc"在

每次安装都会删除Build和bin文件夹。您可以更改构建文件夹的名称。示例目录:

-dir_of_cc
-binding.cc
-binding.gyp

绑定中的绑定属性对象。诈欺行为文件:

{
"target_name": "binding-name",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"sources": ["dir_of_ccbinding.cc"],
'include_dirs': [
"<!@(node -p "require('node-addon-api').include")"
],
'libraries': [],
'dependencies': [
"<!(node -p "require('node-addon-api').gyp")"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ]
}

相关内容

最新更新