VS 2015 Cannot open compiler generated file: '': Invalid argument

狂风中的少年 提交于 2020-05-13 08:13:46

问题


During the build of xerces 3.1.2 I get:

1>XML256TableTranscoder.cpp : fatal error C1083: Cannot open compiler generated file: '': Invalid argument

The compiler does not appear to be working on the .cpp file itself before the error occurs as I can delete all the source code in the file and still get the error.


回答1:


Seems that I was bumping into the path/filename length limitation of Visual Studio. The error message was not particularly descriptive, but reducing the hierarchy solved the problem.




回答2:


Thanks, I would think this would be the same behavior on all systems however, if it were a path issue. I ONLY get this error on my laptop, not on other systems. I reduced the root path down but it still occurs. Also it ONLY occurs on Release builds, not on Debug. Will be trying 2017 soon so hopefully not an issue there.




回答3:


if you using blaze.build, maybe you can use the option --experimental_shortened_obj_file_path. for example:

bazel --output_base=E:\living\_bazel_output build  --experimental_shortened_obj_file_path  --config=opt //tensorflow/tools/pip_package:build_pip_package


来源:https://stackoverflow.com/questions/34074925/vs-2015-cannot-open-compiler-generated-file-invalid-argument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!