从下面的gyp文件生成.sln和.vcxproj后,msbuild失败,
“ C:\ proj \ test \ test.sln”(默认目标)(1)->(“ ValidateSolutionConfiguration”目标)->
C:\ proj \ test \ test.sln.metaproj:错误MSB4126:在配置“ Default中指定的解决方案| X64“无效。请使用“配置”和“平台”属性指定有效的解决方案配置(例如MSBuild.exe Sol ution.sln / p:Configuration = Debug / p:Platform =“ Any CPU”),或将这些属性留空以使用默认解决方案配置。[C:\ proj \ test \ test.sln]
如何使gyp生成Default | x64解决方案?
{
'targets': [
{
'target_name': 'test',
'type': 'executable',
'sources': [
'test.cpp',
],
},
],
}
可能您需要声明目标配置并将其用作默认值target_default
,类似于:
{
'target_defaults': {
'default_configuration': 'Release_x64',
'configurations':
{
'Debug': {
# configuration specific settings
},
'Release': {
# configuration specific settings
},
'Debug_x64': {
'inherit_from': ['Debug'],
'msvs_configuration_platform': 'x64',
},
'Release_x64': {
'inherit_from': ['Release'],
'msvs_configuration_platform': 'x64',
},
},
},
'targets': [
{
'target_name': 'test',
'type': 'executable',
'sources': [
'test.cpp',
],
},
],
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句