Visual Studio 2012 does not generate exe - c++

I've a C++ project in Visual Studio 2012 Express, and I started having problems lately. When I compile the project it works, nothing wrong, however when I try to execute it the .exe disappears. I mean, I compile the project, the project generates the exe file with no problems, but if I try to execute it from Visual Studio or directly from the output directory, Windows say to me:
Cannot start the program 'C:\Users\Adrian\Dropbox\MyApp\Debug\MyApp.exe'.
The system can not find the file specified
If I create another project, Hello World for example, there is no problem and the exe generates and executes good. So I guess the problem is specific to my project. I tried disabling Avast (because maybe he delete the file) and the problem persists.
Also I create another project, including the files and... the problem is still here...
I check the project options, specifically general and debug options and I see nothing wrong.
So does anyone have an idea what may be wrong?
The output directory is $(SolutionDir)$(Configuration)\ and I'm compiling in Debug mode.

The windows error message is misleading. It should state that, loading a library (dll) failed. You might run the program with a process monitor (see: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)

Related

How to properly open a Visual Studio project?

I have a problem that will be very simple to solve but I don't know how to do it.
Scenario: I want to run an emulator coded in C++ by a YT (javidx9) in Visual Studio. The project is here: https://github.com/OneLoneCoder/olcNES and the folder is "Part#2 - CPU"
Problem: I never use Visual Studio, so its something new for me, and my problem is that I don't know how to run the project (emulator). And I can't find any post or article on the internet about my problem. (I tried to create an empty project in VS and then copy the emulator files to the folder of my empty project and then run it, but it sent me an error that the files were not found (and its because that isn't the correct way to run the program and I don't know how to do it)).
My request: I would be very grateful if someone could explain to me how to open and run this project (the emulator) correctly in Visual Studio.
Thanks!!!
Your project does not have. sln file. You need to create new project in visual studio. Last file has main function as below. You need to run this main file(olcNes_Video1_6502.cpp)
You may need to check path of headers included from other projects.

Visual Studio - Can't run program: the .exe can't be found

I am working on a program and so far, it was working perfectly well but now I have a problem: when I build my project, it works, it generates the .exe but I can't run it, I get this error:
Unable to start program 'H:\C++\Shooter\Debug\Shooter.exe'. Specified file could not be found
(it's a translation)
When I look in the Debug folder, the exe is here and when I try to execute it manually, it throws the same error and deletes the .exe. Note that everything works on my second computer which has the same version of Visual Studio.
Also, this project shares the same solution than an other one (the server) but the server works fine.
I already tried repairing Visual Studio but it didn't solve my problem.
Thanks.
It was my antivirus that was causing the problem so I put the directory to my anti-virus safe zone.

Adding more cpp items in Microsoft Visual C++ 2010 Express

I am using Microsoft Visual C++ 2010 Express and I am having a problem saving more than one cpp item within a solution/project.
When I first create a project I can create a new item, write the code and Debug the program normally. But, when I add a new item into that same project and write the code and try to debug it I get this error:
Unable to start program 'Directory' The system cannot find the file specified.
I checked the directory, the file is there and I can open it but I cannot debug it. I would like someone with experience to help me with this problem. Thank you, I am waiting for answers.
http://i.imgur.com/WD7kGgl.png
The error message is about file Directory.exe. If you don't have that file then there were build errors. See the VC++ Output window for build errors. You have to fix them and then try building again. No exe file is produced if there are any build errors.

MSVCR100D.dll error at runtime

Ok , so i created a program using VC++ 2010. it ran just fine.
Got to work and could only install vc++ 8 due to having a crappy computer that is still stuck on xp sp2...
Everything will link up and build with no errors, But when the program starts to run i get "This application has failed to start because MSVCR100D.dll was not found"
I tried changing the runtime libary from MDd to MTd but still no luck...any idea?
That DLL comes with Visual Studio 2010. If you want to use your program, you'll somehow have to get your hands on it. If possible at your work, you can download it. Another (probably better) option would be to take it with you from home on a USB drive.
Edit: You can also try re-creating the project, and then copying the source code over into the new project. Your newly created project (in Visual Studio 2008) should not be depending on that erroneous DLL.
Edit 2: As Hans Passant added in a comment, this DLL is needed by Debug compilations of your program. So if you simply compile as Release, you can safely ignore the first part of my post. (I hope I'm not breaking gentleman rules by adding this to my post.)
MSVCR100D.dll is for debug mode, and is installed with visual studio 2010, since 2008 has MSVCR80D. You can just google that and download it, and put it in the same direcrory, or just complie in release mode.
here is a download link. You need the small download zip file button, not the big ones.
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
As I know, MSVCR100D is debug version of runtime library used by VC2010。So, if your point either is:
(1) you do not have that dll which you really need, you can download at http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d or
(2) you want to run that program without requirement of MSVCR100/D.dll, you may need to recreate a project in VC8, then substitute with your source files (not solution file or other files managed by Vistual Studio).
FYI: If my memory were not going wrong, I remember that a project created by higher version of VS cannot be opened directly by lower version one. So, how did you build them?

My Qt5 executable does not run outside of Visual Studio 2010

I have done a big project with Qt5 and visual Studio 2010. Everything is well inside of visual studio using the run button.
But my goal is of course to release it to other persons, without visual studio.
My problem is: I can't get the .exe run outside of visual studio. I was asked for several dll's at first, I found them all in the Qt5 bin folder.
But know I got rid of those messages, when I wan't to open my exe, nothing happens.
Just nothing.....
I cannot even find my exe in the windows task manager.
Does someone here know an answer to that issue?
There are dll files that are loaded during runtime and don't give you any error, warning or whatsoever when not present (also totally transparent to dependency walker). Such is the platforms\qwindows.dll - note that it must be in a platforms\ subfolder relative to the executable. You might also be missing libEGL.dll and libGLESv2.dll.
Dependency Walker is not very useful in this case as it shows very strange dll files missing: API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL etc.
You can use Qt5.x cmd prompt ( 5.x is the version that you are using) and run windeployqt.exe from your build directory. It will automatically find and copy all necessary dll files to your output directory.