C++ Cygwin compiled file (.exe file) not being found - c++

I'm using Cygwin to compile and run my c++ files. I have already been able to run my files on this computer (just working yesterday), but today I started my computer and tried doing it again, but now it is not working.
When I compile my file, the .exe file (that was working and saved yesterday in the same folder) shows up for a couple of seconds (while the terminal loads the next line of command) then, the .exe file disappears when the terminal brings up the next line of the command prompt.
I have been searching for a fix but can't seem to find a solution, any ideas on what I can do?
I will wait some time and update the post if anything else happens.

Related

Can't run .exe file on another computer

I'm trying to figure out why my application will not run on another windows computer. I have tried to run the exe file on multiple other computers where it starts the application up fine, however, when running it on a Teguar running windows 10, the application throws an exception.
It seems like the problem accurs when I try to use Open3D, since when I don't include Open3D the application can run on the computer. However, the program can still run on all other computers with Open3D included just not on the Teguar.
I have tried to run the exe file through "SimpleProgramDebugger" and here I can see what files are called. This is the files from my own computer where the program runs fine.
Here is an image of the files from the Teguar:
And lastly here is the message on I am given when simply running the application:
Hopefully someone can help with this frustrating problem :)

How Can I send .exe files that will still execute on the recipients computer?

I've written and compiled a program in c++ that does replaces an online calculator for a business. How can I send them this file in a way that will allow them to run the program without downloading a compiler?
I have tried sending the file as a .txt and changing it to a .exe, as well as sharing a google drive.
When I run the program from my own laptop desktop it is successful, but throws the following error message on the recipients laptop:
The code execution cannot proceed because libstdc++-6.dll was not found. Reinstalling the program may fix this problem.
I assume that this is because they do not have the compiler downloaded (I used VSC to write and compile). Is there any way around them downloading VSC and compiling the code themselves?

Strange behavior of Eclipse Neon

I use Eclipse with CDT plugin for my C/C++ development. And I use MinGW compiler. Environment Path set properly. All the setting done properly in Eclipse. While editing the source code its working fine but after compilation when I try to execute the source code sometimes it says it cannot open the .exe file or sometimes doesn't show anything when there is some input to take. When I stop the execution pressing the red button program gets executed completely with default values.
But everything is fine if I compile and run the same source code using notepad and the command prompt. Please help.
A common problem is that if the program is currently executing, the program file is opened by the system and cannot be reopened for writing by the compiler (or more exactly by the linker). This problem can be easily reproduced by starting the program in debug mode and stop it at a breakpoint. Then, while the process is active, change a line in source and ask for a new build: you will get the error saying that the exe file cannot be opened.
How to fix: ensure to close any possible execution of the program when the error happens and rebuild

Code::Blocks program doesn't run properly when run button is hit

I have been compiling and running programs in C++ on Code::Blocks longly but today one of my programs compiled successfully but when I ran the program it returned -12 with time -0.00s. Whenever I write a new program in C++ the program compiles but it doesn't run. Also when I open the executable file created by Code::Blocks in the same directory Windows takes permission from me to allow the executable file to make changes to the computer. I've been trying through the day but I couldn't figure out what could be going wrong.
Also when I tried uninstalling Code::Blocks it didn't uninstall completely and when I opened the Code::Blocks folder in Program Files and tried deleting the folder the folder MinGW couldn't be deleted because Access was denied.
Please help if you could comprehend the problem and have knowledge regarding the issue.

Can't run programs on my mac

I've been programming on windows for about three months now and when my computer finally died I bought a mac. I'm really happy with it except I can't figure out how to run my c++ programs.
On windows it would open up in command prompt so I figured it would do the same thing except with terminal.
After I write my programs (in Xcode) I can compile them and it'll tell me if there are syntax errors but the run and run related buttons are all Grey and unusable.
It's incredibly annoying that I can't see how the program that I put 4 hours into runs and even more annoying that I don't know if I've made a runtime error. Someone please help.
Thank you very much, James
Assuming that you're trying to write a program that you interact with on the command line, you want to create a "Command Line Tool" project, found under "Application" in the Mac OS X section of the New Project dialog. Choose "C++ stdc++" from the "Type" dropdown, as well. This will give you a main.cpp that should look familiar to you, with a "Hello, World!" sample.
Note that when you Run this program, it might appear to do nothing - You need to open the Console (from the Run menu, or shift+command+R) to see your output.
Xcode deals in projects. If you're just opening the source file, there is no project. Create a project with the files in it and Xcode should let you run it.
Alternately, you can just use G++ on the command line to compile your files and run the resulting executable there.
Try compiling from the terminal as stated above. The a.out file should be created, and should run as long as Xcode has been installed. It should work fine from the terminal, and point out any errors in the compiler's output.
To runs the a.out file, ensure you are in the files directory in terminal and type ./a.out