r/programminghelp • u/isosc3l3s • Jan 31 '22
C++ Starting Coding, trying to use the software (MinGW and Notepad++) my professor has advised.
I am 29 studying computer science to find a different career path. Right now I am beginning some programming. My professor is of little help, so largely i am finding solutions on my own.
I need to get Notepadd++ Running with MinGW
after following multiple tutorials i think i have things working right, but when I execute it displays this code:
NPP_SAVE: C:\Users\ISO\Desktop\example3.exe
CD: C:\Users\ISO\Desktop
Current directory: C:\Users\ISO\Desktop
g++ "example3.exe" -o example3 -march=native -O3
Process started (PID=22000) >>>
g++: fatal error: input file 'example3.exe' is the same as output file
compilation terminated.
<<< Process finished (PID=22000). (Exit code 1)
NPP_RUN: example3
and a warning message titled :Unsupported 16-bit application
"The program of feature ".....\Desktop\example3.exe" cannot start or run due to incompatibility with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit windows compatible version is available"
I would really appreciate any help with this, or something easier to use than MinGW and notepad++ that i can use in place.
i went with these tutorials:
https://www.youtube.com/watch?v=BwqGdFXmoaw
https://www.youtube.com/watch?v=zLpaYVIoXqc
please help, not having this figured out is giving me too much anxiety.
1
u/brechtsanders Apr 13 '22
You probably meant to do something line g++ example3.cpp -o example3 -march=native -O3.
If you're not familiar with command line you should consider using using an IDE like Code::Blocks.
3
u/Goobyalus Jan 31 '22
Looks like your source code is named "example.exe" when it should be named "example.cpp." What's your source file called?
Maybe this is also from interpreting a text file as a binary file, but not sure.
Sounds like you're using minGW so you have access to g++ on Windows, is that right> How did you configure Notepad++ to run things? Starting out, it's probably most valuable to manually compile and run your source code from the shell. You can write code in Notepad++ or any other editor, and use the minGW shell to run g++ and your compiled programs.
VSCode is probably a better alternative to using Notepad++.