I'm trying to run my program with MinGW compiler through batch file. But when I try to launch it, it says nothing.
Here is a code:
g++ -o Learning.exe Main.o
pause
When I just opening .exe file, it working perfectly. How to fix that?
I'm trying to run my program with MinGW compiler through batch file. But when I try to launch it, it says nothing.
Here is a code:
g++ -o Learning.exe Main.o
pause
When I just opening .exe file, it working perfectly. How to fix that?
GCC is silent if there aren't any issues, errors or warnings.
Do you want to run the actual program you created? Right now you just link it.
To compile and run if there weren't any issues, you can use the following:
g++ main.cpp -o learning.exe && learning.exe
pause
The part behind && won't be executed, unless there haven't been any error during compilation (return value not being 0).