Visual Studio compiles but the exe isn't there

2019-06-15 18:17发布

Source code that compiles fine on other peoples environments won't correctly work in my environment. When I do a rebuild the compile occurs but when visual studio goes to move the exe from /obj/debug/{solution} to /debug/{solution} it cannot find the exe in the /obj/debug/{solution}. To make this even more crazy even after I reinstall visual studio it doesn't work. On other people environments it works find. Please note that this is a windows mobile 6, compact framework 3.5 project, Visual C++ project.

EDIT: Visual Studio 2008 is being used.

EDIT2: After looking at the logs again come to find out it says it is compiling but it isn't really compiling. Interesting enough it doesn't throw any errors until it tries to link the code. When it goes to link the object files, they aren't there and it fails.

10条回答
成全新的幸福
2楼-- · 2019-06-15 18:54

In the solution properties page, check whether the path you are expecting the exe to be is same as the one specified in Linker -> Output file.

Another obvious mistake could be, check what build configuration you are building. You might be doing a release build and expecting a debug executable file :) I have done this a few times.

查看更多
戒情不戒烟
3楼-- · 2019-06-15 18:58

As far as I could tell, you need to "Save All" before building.

查看更多
再贱就再见
4楼-- · 2019-06-15 19:01

If you create a new "hello world" WM project, does it work?

If so, you can compare the solution files to check for differences that can cause this.

查看更多
孤傲高冷的网名
5楼-- · 2019-06-15 19:01

I had exactly the same problem. Just close Visual Studio and reopen it again (basically restart it) and it should work.

查看更多
登录 后发表回答