Error Code -1073741515 When Using EDITBIN

柔情痞子 提交于 2019-12-29 09:18:21

问题


I'm using EditBin to increase the stack size of an application I'm writing. I have this in the post-build event command line for Visual Studio:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\editbin.exe" /STACK:268435456 "$(TargetPath)"

When I build my project, I get this error:

Error 470 The command ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\editbin.exe" /STACK:268435456 "[Target Executable]"" exited with code -1073741515.

I have both of the following in my PATH environment variable:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin

The command also works when I run it manually with cmd.exe. Does anyone know what the problem is here?


回答1:


I had the same issue, how I resolved it:

Ran msbuild.exe <my.sln> /t:<mytargetproject> from a VS2010 command prompt, where <my.sln> is your solution name and <mytargetproject> is the project you are trying to build. For e.g. msbuild.exe helloworld.sln /t:mainproj.

When you do this or at least when I ran this, a dialog box popped up and said "foo.dll" cannot be found, I added the path of that dll to my "PATH" environment variable and the problem was solved! See ChrisF's comment to the question, as it says, the error is that some dll/component is missing.

From the dll name it complained about, I believe this is not contained to VS2010 libs/dlls, for me it was a third-party dll (which I am using and supposed to be available during the build) it was complaining about.




回答2:


The best solution is to run the vcvarsall.bat located in the root of the visual studio install folder(C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC). That sets up the search folders for all MSVC compiler related tools.




回答3:


I got this to work for now by copying mspdb100.dll into the same directory as editbin.exe, but this is not an optimal solution because every developer on my team will need to do the same thing.



来源:https://stackoverflow.com/questions/4189109/error-code-1073741515-when-using-editbin

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