Errors, but still runs

Started by
3 comments, last by t2sherm 23 years, 9 months ago
In all of my projects before when ever i get a compile error with VC5, it won''t run the program, (which is what i want), but now i have a new project, and If i hit the exclamation mark button, that will compile then execute, if there are errors during the compile, it still exectutes. I noticed that the folder it created is called Release instead of my other projects which were called Debug, so I guess i''m in release mode and not debug mode. Is this normal? and why would you ever want to run your program if it had errors in it? t2sherm ô¿ô
t2sherm ô¿ô
Advertisement
These errors are probably just warning (which will not stop the creation of the exe file). If they say error and not warnings, there is an option in VC++ that displays warnings as errors, it''s probably turned on. Goto "Settings..." under the project menu, select "C/C++" tab, Select "General" from the Category list box, and you''ll see a check box "Warnings as errors"

BTW, this has noting to do with Release and Debug. Debug mode can track runtime problems in your app (ex. if your app crashes with a General Protection Fault and you click on Debug it will show you the exact line of code that caused the crash), while Release is for speed and performance. Use "Set Active Configuration..." under the "Build" menu to change between the two.





+AA_970+
These are not just warnings, they are errors like this, i took the semicolon of the end of a line then i hit the execute button, and i get this:

Compiling...
ddex4.cpp
D:\Pong\ddex4.cpp(72) : error C2146: syntax error : missing '';'' before identifier ''BOOL''
D:\Pong\ddex4.cpp(72) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file ''.\Release\ddex4.sbr'': No such file or directory
Error executing bscmake.exe.

Pong.exe - 3 error(s), 0 warning(s)

But it STILL runs, very strange. Do you think it could have anything to do with creating the browse info?, is that a bad thing to do?

t2sherm ô¿ô
t2sherm ô¿ô
the likelyhood is that you''re running an old executable, not a newly compiled one...

somewhere, like WinMain, insert this code:

    MessageBox(NULL, "Time of build was: ", __TIMESTAMP__, 0);    


this will let you check how new or old the executable is (i''ve just realised you could actually just look at the date in explorer instead ... but real programmers never take such easy options)
[email=ehremo@hotmail.com][/email]
If something seems unusual when compiling a project - then do a Rebuild All. This will clean the target directory, removing previously created OBJs and more importantly the previous EXE.

This topic is closed to new replies.

Advertisement