DEV C++ : No error while compiling any program but it is not running - dev-c++

All are working fine with DEV C++. Suddenly it stop working well. Program is compiling with no error messages. But when i hit run button nothing is happened. This is happening with all program. So there is no issue with program.
This was also happen earlier with me. Then i reinstall DEV C++ then it worked fine. But after sometimes it started again. I don't want to reinstall again and again. Currently I'm using window 10.
Any help will be great. Thank You.

Finally I solved. It was my avast who is blocking the application to launch. Avast is considering the application as a false positive means as a threat to the system(false).
Avast was wrong it was not a threat for the system. That's why it is a false positive. Then i add an exception(rule) to avast not to scan a particular file/folder. But this is also not working well.

Related

CodeLite closes terminal instantly

I'm a beginner in C++ and I started an Udemy course. In that course they recommend using CodeLite as IDE, so I decided to give it a try. In the course, they write a basic program that displays "Hello world!" to show how the IDE works. They compile then execute it, and a terminal window opens with the "Hello world!" message like normal.
In my case, after following the setup process step by step and using the exact same code as them, when I compile and execute the code, my terminal flashes for a split second and then disappears. In their video the terminal remains open but I thought that since they have an older version of CodeLite maybe in the newer one that I have, the terminal is supposed to close by default.
I went online and found people saying that a way of keeping the terminal open is by adding #include and system("pause"); on Windows, but in my case the terminal keeps behaving the same, and CodeLite doesn't report any problems. I've also tried cin.get(); with no success.
Any idea what could be causing this problem?
I had the same problem and I did these steps to solve the problem:
Uninstalled CodeLite.
Installed MinGW correctly.
Then reinstalled CodeLite.
Then did tutorial steps: Click Scan then select MinGW.
After I did these steps, it worked normally.
I had the same problem running Codelite on OpenSuse Leap 15.1. I eventually found a very simple answer. Go to the Settings menu, select Preferences and then Terminal, on the left towards the bottom. Change it to konsole to use the standard terminal, rather than the codelite-terminal.
I know this is an old question, but did not see the answer that worked for me. Debugging (F5) will close the terminal after completion.
However, running/executing (CTRL+F5) will not. Leaves terminal open. At least this is the case for me, and hopefully this helps someone out.
I know this is an old question, but CodeLite has a Project-level setting for "pause when execution ends" which will pause the program before the terminal closes so that you can see outputs and the like.
To turn on just right click on your project, go to settings, and it should be in the center of the general tab.
I went online and found people saying that a way of keeping the terminal open is by adding #include and system("pause");
And this is the wrong way to do it - the desire to leave the window open/closed is not meant to be controlled by your program; but the thing calling it. For example, you break the ability to run it as part of a headless script.
Much better would be to run it in debug and put a break point at the return of main, or to find the configuration option in your IDE that stops it closing the window.
I am not aware why CodeLite would behave like that. If you really added some pause or blocking call and it still closes, it looks like it is not really running the program (e.g. something breaks before that or something is misconfigured).
First, try to open a terminal yourself (e.g. cmd or PowerShell on Windows), and execute your compiled program there -- that way, the terminal will remain open. If that works, then compilation went fine, but something is wrong with CodeLite's configuration, most likely.
Otherwise, as a last resort, since using CodeLite is not strictly required, simply switch to another IDE/toolchain, e.g. Visual Studio (on Windows).
For some reason, after closing and reopening CodeLite, it now works, the terminal remains open when I run it from the IDE. I don't know what solved the problem since I've closed and reopened CodeLite at least 5 times before this without anything happening. Thanks for the help though.
I had the same issue. What I found wrong was that the compiler that I installed was 32bit and I was using the 64bit CodeLite version . Try Installing the 32bit CodeLite version and it should work fine.
It worked for me.
I had this problem also, I tried uninstalling and reinstalling code lite but the problem still occurred.
I went back and checked the Environment Variables in control panel and I had placed the systems variables in "Path" to the incorrect Bin directory.
I corrected the entry, uninstalled and reinstalled code lite again and the problem was resolved.
Hey I also had the same problem, doing the same course! What I did was to relocate my mingw-w64 folder, deleted the earlier path from environment variables and added the new path. I uninstalled CodeLite; not saving the user information. I actually downloaded the 14.0.0(64-bit) instead of the newer version 14.0.1(64 bit) . Then I did the steps that Frank tells you and it worked out for me.
I am completing the same Udemy course and encountered a similar problem of the console closing immediately. I encountered the problem for a workspace with 1.) a long name and 2.) ending with an underscore "_". I reduced the size of the folder name which also involved deleting the trailing underscore. This appears to have solved the problem. I encountered this problem with one of Frank's provided workspaces so I knew it was not a compiler issue.
I had an issue with section 20 of my Udemy course because it had parenthesis in the workspace folder name. "(STL)" at the end. Once I got rid of the special characters, it worked fine.
If pause("system"); or cin or restarting Program and whole PC solutions are not working, then make sure to:
Copy your code.
Create new Project and past your code there.
Make sure the new project is selected before trying to double-click it.
Notes:
You can now delete the old not working project and rename your new project.
I don't know what's the reason of the problem, but I did that and it worked for me.
You need to make sure if it is 64bits CodeLite then you have installed 64bits MinGW. Through the IDE itself, you can re-run the setup wizard
Restarting Codelite worked for me ...

Visual Studio 2013 freezing after completing a build

I have encountered a very strange problem and I haven't seen an answer to this anywhere on this forum or others. Yesterday when I pressed f5 to build my program, it compiled, said "Build successfull" and then VS froze. An .exe was created but when trying to run the file, it say that it's already open in system. Since then, even when I create a new project, the same thing happens. TO open the .exe again, I have to restart the compute and when I try to run it after a restart, nothing happens and it locks up again.
This all happened after I opened an example project that I got from my programming teacher. I suspected that the project might have screwed my settings but I tried reseting my settings and re-installing VS. Neither worked. I also ran ccleaner and removed all VS related folders. I have tried several fixes that I red about on this forum that seemed to be related but none of those have worked either.
When I opened a project that I created on my computer, on another computer, that screwed up VS on that computer as well so now I basically am unable to work anymore. I was logged in on my MS account on VS on both computers but could that really have anything to do with it? I am at a loss here and really need help.
I have sent an email to my teacher about it but I don't know how quickly he'll respond so I thought you guys might be able to help. Since I didn't find a similar issue on the site, I thought this might be a useful topic to solve as well.
Thank you in advance, LethalJam.

Visual Studio 2015 error: Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039". Remote connection closed

I see the following error whenever I try to debug "Cross Platform" under "C++" category: "Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039". Remote connection closed"
I've installed all of the contents when I downloaded Visual Studio 2015 community and I ran it on Windows 10 Pro which supports Hyper-V.
I've been searching a solution for this and I've found an assumption:
"What is your debug target, the VS Android Emulator? When we saw this before it turned out to be a bad emulator image. Do you have this problem with all targets (e.g. if you try a physical device) or just one?"
In my case, I just tried this via Emulator(VS Emulator 5" Lolipop (5.0) XXHDP Phone (0x86 -...)
So I've sent an Email to VS 2015.
And the answer was like this:
"Sorry for the delay in responding we were looking at an emulator image of another user that ran into this problem so I was waiting until we had the results of that investigation to report back. We actually were not able to find anything wrong the emulator itself, our current hypothesis is that it is a network or adb problem interfering with GDB’s ability to connect to GDB server on the remote machine. Do you see this error every time you try to debug, or if you reboot the emulator will it work sometimes right after the reboot? Next time you see the error, can you open the emulator’s console mode by going go the Hyper-V manager and double clicking the emulator. Then find the location your app installed to and run “gdbserver --version" from the app path and let me know what it says? This will validate if the correct version of gdbserver is on the device."
So we are trying to solve this problem but I'm also asking here just in case.
Is there anyone who has magical solution for this problem?
I'll put a comment on this if I figure out how to solve this.
Thanks in advance.
** Following answer is from the manager of Visual Studio 2015:
You are only the second person who has run into this issue, and the first person that ran into it provided their everything works correctly when we run their .vhd on our machines so it appears to be some strange problem where gdbserver (which comes from the Android NDK provided by Google) crashes only when running on certain machines. Unfortunately the .vhd you provided does not appear to be the correct one it won’t boot for me. You can see the .vhd file being used by the emulator if you look under the settings of the emulator in your Hyper-V manager. .However given we got the other person’s .vhd you can hold off providing any additional information at this point. I’m waiting to hear back from the emulator team on if they have any ideas since this appears to be an issue only on specific machines since.
If you don’t mind my asking, if you don’t have a background in computers what inspired you to try C++ on Android? That scenario will be significantly more complicated than doing Java on Android.
It's been almost two months since I got this answer but I haven't got any additional response from them yet. So, I ended up quitting developing an application by using VS2015.
If you run into this problem, there are only two ways to go. Change your computer or stop developing application via VS2015.
If the project name contains spaces, the whole remote debugging fails. Visual Studio also creates weird paths. When checking out the "Blink1 for Raspberry Pi" template, I named the Project "Blink1 for Pi", which resulted in a path like this:
~/projects/Blink1?/for/pi/PI/for/pi....
And all the debugging failed. When I recreated this keeping the project name "Blink1", everything worked fine. It's a pity, that spaces aren't handled here...

Console Window does not appear using Dev C++

When I compile and run my code, the console window no longer shows up.
(I have "system("pause");" included, this is not the issue).
I was trying to debug a program in Dev C++ and must have changed some settings. Any advice?
Dev-C++ is really old and the debugger is full of bugs. If you're sure the problem isn't with your code, then I'm assuming you've tried the basics, like restarting Dev-C++ and restarting the computer?
If that doesn't work, try reinstalling Dev-C++... It only takes a couple seconds to install it.
You can also try stepping the code.

Program won't run in NetBeans, but runs on the command line!

So, I'm starting a C++ class right now, and I've configured NetBeans (which I use normally for PHP and Java Development) to use the Cygwin compiler/debugger. This is my first structured experience with C++, and I'm running into a slight issue. When I attempt to run a program within NetBeans (F11 or the Green Triangle) the project builds correctly, no errors or warnings, but then won't run. I receive the following error:
The application failed with exit code -1073741515 (0xc0000135).
This could indicate that no required .dll was found in the PATH.
Please try to start the following command from the command shell (cmd.exe).
This may give some additional information.
C:/Users/Eric/Documents/NetBeansProjects/CS217ASeminar1/dist/Debug/Cygwin-Windows/cs217aseminar1
RUN FAILED (exit value -1,073,741,515, total time: 58ms)
When I attempt to execute the given file within a command shell, I get no errors and the program runs successfully. The research I've done on this error usually indicates that C:\cygwin and/or C:\cygwin\bin (my install directories) aren't in the path. However, I've verified that I they've been added to the path, and I can run arbitrary programs from both of those folders.
Does anyone have any suggestions on how to resolve this error, or any experience with something similar? Obviously, it's not a huge deal, but I'd like to be able to use NetBeans's built in functionality.
Thanks in advance.
Edit: After tinkering a bit with the settings of my project in an attempt to fix it, it appears that the error was being caused by the Profiler in NetBeans. Since that only works on Linux/Solaris, and this is a Windows 7 box, disabling that caused no loss of functionality and solved the issue. Thanks for everyone who tried to help.
After tinkering a bit with the settings of my project in an attempt to fix it, it appears that the error was being caused by the Profiler in NetBeans. Since that only works on Linux/Solaris, and this is a Windows 7 box, disabling that caused no loss of functionality and solved the issue. Thanks for everyone who tried to help.
Right click on project change set configuration from debug to release. It worked for me.
Might be wrong, but it sounds like your path might not be set correctly...
Netbeans docs