-5

Ok, let me be very clear so I don't have to repeat myself later on. Please read carefully, I'll try to be as concise as possible. I will put parts I want to stress in bold.

I am pretty good with C++, I am not a begginer. I made alot of projects and this is I think the second time it happens in 6 months.

Here's the problem, I started a console project that doesn't have a console, but an opengl window launched by the SDL library. I was having fun and all and built and debugged my project several times and it was both building and running fine.

Then, out of the blue, I built my project after some addition (shooting bullets, if you wanna know) and I wanted to test the addition. it built fine (build succeed), but when I try to start debugging, it says that the .exe file was not found. It doesn't seem to create a .exe file.

Now here are some precisions you might wanna know:

  • I didn't change project settings and it was running fine before.
  • It has nothing to do with my bullet shooting, I mean it builds fine.
  • My project has a main.cpp and a GLRect Class I made and a GameConstants.h file I made with game constants in it.
  • I'm using Visual Studio 2010, I installed the SDL-1.2.15 library with the SDL_image add-on.
  • I'm running on a Windows 8 64-bit laptop with the following specs: 16GB Ram i7 ivy bridge processor 2.3GHz NVIDIA GTX 670M 3GB graphic card

If you need more specs just ask

  • Origine is the name of my project.
  • In C:...\Origine\Origine\Debug\ I have a lot of .tlog files.

Here's a build log, however it is in french...

1>------ Rebuild All started: Project: Origine, Configuration: Debug Win32 ------
1>Build started 2013-07-01 01:54:39.
1>_PrepareForClean:
1>  Deleting file "Debug\Origine.lastbuildstate".
1>InitializeBuildStatus:
1>  Creating "Debug\Origine.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1>  main.cpp
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\main.cpp(26): warning C4244: 'argument' : conversion de 'time_t' en 'unsigned int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\main.cpp(133): warning C4018: '<' : incompatibilité signed/unsigned
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\main.cpp(161): warning C4018: '<' : incompatibilité signed/unsigned
1>  GLRect.cpp
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.h(14): warning C4244: 'argument' : conversion de 'const double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(46): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(46): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(47): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(47): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(48): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(48): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(49): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(49): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(54): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(54): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(55): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(55): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(56): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(56): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(57): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(57): warning C4244: 'argument' : conversion de 'double' en 'GLfloat', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(165): warning C4244: 'argument' : conversion de 'double' en 'int', perte possible de données
1>c:\users\alexandre\documents\visual studio 2010\projects\jeux\origine\origine\glrect.cpp(165): warning C4244: 'argument' : conversion de 'double' en 'int', perte possible de données
1>  Génération de code en cours...
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: conflit entre la bibliothèque par défaut 'msvcrt.lib' et les autres bibliothèques ; utilisez /NODEFAULTLIB:library
1>Manifest:
1>  Deleting file "Debug\Origine2.exe.embed.manifest".
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: conflit entre la bibliothèque par défaut 'msvcrt.lib' et les autres bibliothèques ; utilisez /NODEFAULTLIB:library
1>  Origine.vcxproj -> C:\Users\Alexandre\Documents\Visual Studio 2010\Projects\Jeux\Origine\Debug\Origine2.exe
1>FinalizeBuildStatus:
1>  Deleting file "Debug\Origine.unsuccessfulbuild".
1>  Touching "Debug\Origine.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:02.05
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
  • 5
    `Ok, let me be very clear so I don't have to repeat myself later on.` -- You guys can't just understand it in one go! – devnull Jul 01 '13 at 05:46
  • 5
    Rebuild all, and if that doesn't work please include the build-log in your question. – Some programmer dude Jul 01 '13 at 05:48
  • Can u debug if you remove the new addition (shooting bullets)? – asafrob Jul 01 '13 at 05:49
  • 1
    Writing protip: don't stress "out of the blue." – Potatoswatter Jul 01 '13 at 05:51
  • I rebuilt many times. – user2537827 Jul 01 '13 at 05:52
  • It cannot debug if I remove bullet shooting – user2537827 Jul 01 '13 at 05:53
  • It gives the impression that something messed up when building and now my project is somewhat screwed unless I do something... – user2537827 Jul 01 '13 at 05:53
  • @johnchen902 Looking at the log, the original text read "I will put parts I want to stress in caps, I'm not raging at my computer screen." and Alex helpfully (mercifully) changed the caps to bold. – Potatoswatter Jul 01 '13 at 05:54
  • It's too long for being in one comment – user2537827 Jul 01 '13 at 05:56
  • Oh and it's in french... – user2537827 Jul 01 '13 at 05:57
  • 1
    Please edit your question and add it there. Make sure you highlight it and hit the `{}` button so it's correctly formatted. I'm sure we can handle some french. If not, Google translator is our friend. – paddy Jul 01 '13 at 05:58
  • 1
    Did you get it off BitTorrent? – Captain Obvlious Jul 01 '13 at 05:58
  • @user2537827 You can either 1. Edit your question or 2. Provide an external link. About language... We can ask Google to translate. – johnchen902 Jul 01 '13 at 05:59
  • Don't post code or logs or things like that in a comment, edit your question and add it there instead. – Some programmer dude Jul 01 '13 at 05:59
  • Done, lots of warnings, could it be that? I mean, warnings don't really matter, it's mostly type incompatibility (signed/unsigned), but I make sure no data loss occurs. – user2537827 Jul 01 '13 at 06:06
  • And btw, now that I think about it, it's strange that my build logs are in french since my IDE is in English... – user2537827 Jul 01 '13 at 06:07
  • @user2537827: Actually, warnings *do* matter, but not in this case. Could you check that you actually do have an "origine.exe" file somewhere? By default, it should be in you solution directory, under "Debug". If in doubt, you can use Windows' "Find..." or something. – yzt Jul 01 '13 at 06:09
  • In C\...\Origine\Origine\ I have no Origine or in this case Origine2.exe, I have .exe.embed.manifest,res and others but they all have suffix extensions after the .exe. – user2537827 Jul 01 '13 at 06:13
  • However when I went to C:\Origine\Debug\ (insted of C:\Origine\Origine\Debug) I had a .exe, but when I tried to execute it, it said "C\..\Origine\Origine\Debug\Origine.exe file not found" and it got automatically deleted. – user2537827 Jul 01 '13 at 06:15
  • You should really fix those warnings, as they can indicate undefined behavior. The most important things to fix is the linker conflicts. Also, can you please post the output from when you try to debug? If there is any then it could tell a lot too. – Some programmer dude Jul 01 '13 at 06:16
  • Sounds like your anti-virus is getting in the way. Could be a false positive from a recent update. Check your anti-virus logs and quarantine list. – Captain Obvlious Jul 01 '13 at 06:17
  • @JoachimPileborg: Neither the warnings nor the link conflicts are causing his problems. Although fixing them is the Right Thing, it won't help here. – yzt Jul 01 '13 at 06:17
  • @CaptainObvlious: I was going to say the same thing! – yzt Jul 01 '13 at 06:18
  • @user2537827: Could you temporarily disable you antivirus and do a rebuild? – yzt Jul 01 '13 at 06:19
  • Nothing in the console, however here is what the pop-up message says: And notice how this message is bilingual... Unable to start program 'C:\...\Origine\Debug\Origine2.exe' Le fichier spécifié est introuvable. – user2537827 Jul 01 '13 at 06:23
  • possible duplicate of [Error while trying to run project: Unable to start program. Cannot find the file specified](http://stackoverflow.com/questions/5864520/error-while-trying-to-run-project-unable-to-start-program-cannot-find-the-file) and [Error Message:Unable to run program , the specified file is not found](http://stackoverflow.com/q/16301043) – Cody Gray - on strike Jul 01 '13 at 06:27
  • Beyond the actual problem, the random bilingual error messages that you're getting are very strange. I suspect something is wrong with your operating system and/or Visual Studio installation. As others have mentioned, pirating software from BitTorrent subjects you to problems like this. Remember that Visual Studio Express is [a free download](http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express). – Cody Gray - on strike Jul 01 '13 at 06:28
  • OMG Thank you! Yea it was Avast the problem and I am surprised I didn't think about it, because I am usually very good at debugging my code and the one of others as well. What should've made me suspect avast is when the .exe file I had got deleted without warning Now, could you tell me how to make avast stop blocking it please? And how can I mark this question as resolved? – user2537827 Jul 01 '13 at 06:29
  • You can and are encouraged to [answer your own question](http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/) when you find the answer. There is a system-imposed delay before you can accept your own answer, but eventually you will be able to do so, which marks the question as "resolved". – Cody Gray - on strike Jul 01 '13 at 06:33
  • Thanks guys, one last thing, even if I suppose it's not good, but what does the -3 means next to my question? – user2537827 Jul 01 '13 at 06:47
  • The -3 means your question was downvoted. And BTW: replace Avast, it creates a lot of strange problems for many customers. – Frunsi Jul 01 '13 at 06:52
  • And replace it with what? – user2537827 Jul 01 '13 at 06:59
  • @user2537827: Comodo Internet Security. Also, that -3 means at least 3 people found your question to be useless, irrelevant or otherwise unsuitable for SO. – yzt Jul 01 '13 at 07:58
  • The bilingual error message can happen when the OS is in french and the IDE in english. If both are english, then you have a bigger problem. ;) – Skalli Jul 01 '13 at 15:25

1 Answers1

4

The problem is your anti-virus software. The obvious symptom is that the file is deleted when you immediately attempt to start it manually (and that you commented it was the problem). Refer to your anti-virus documentation on how to add an exception to the directory or file.

Captain Obvlious
  • 19,754
  • 5
  • 44
  • 74
  • 1
    Also consider configuring your antivirus to do something *slightly* more sane than an automatic delete, like quarantine the file. – Cody Gray - on strike Jul 01 '13 at 06:53
  • Migrate to linux or mac osx and compile in a VM. – user1095108 Jul 01 '13 at 06:55
  • And you probably don't want your antivirus checking the executables you are building anyways, since it only slows down your builds (only a factor for large projects.) Consider adding your working directories or your project trees to the "exclusion" list of your antivirus. – yzt Jul 01 '13 at 08:01