简体   繁体   中英

Visual Studio 2012 not producing .exe

I just installed and tried to build a simple Hello world program, however I can't seem to find the .exe, nor any way in which I can see the program produce the "hello world". Attached are the screenshots of what I am trying to do to build, and the folder in which I believe it should be outputting an .exe

http://i.imgur.com/HKAmK.png http://i.imgur.com/WK2Hb.png (It isn't in the subfolders either)

  1. Make sure, that the CPP file is inside the SourceFiles in your project. If it is not, it will not be built.

  2. Check the properties of project (especially the General tab) for the output directory for project files.

  3. Build your project. Visual Studio informs in Output window, where is the binary, eg.

1>------ Build started: Project: NativeConsoleSketchbook, Configuration: Debug Win32 ------
    1>Build started 2012-12-06 09:39:35.
    1>InitializeBuildStatus:
    1>  Creating "Debug\NativeConsoleSketchbook.unsuccessfulbuild" because "AlwaysCreate" was specified.
    1>ClCompile:
    1>  main.cpp
    1>Link:
    
    1>FinalizeBuildStatus:
    1>  Deleting file "Debug\NativeConsoleSketchbook.unsuccessfulbuild".
    1>  Touching "Debug\NativeConsoleSketchbook.lastbuildstate".
    1>
    1>Build succeeded.
    1>
    1>Time Elapsed 00:00:02.81
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Me too got build succeded message but the exe was not generated.

In Visual Studio Solution Explorer pane, right click on the source file and select properties. Make sure it is not set to " Does not participate in build "

Change it to the " C/C++ compiler " using the drop down list.

源文件属性页

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM