Author Topic: Process terminated with status 2 (0 minute(s), 0 second(s))  (Read 306 times)

Offline mehdikhazane98

  • Single posting newcomer
  • *
  • Posts: 2
Process terminated with status 2 (0 minute(s), 0 second(s))
« on: October 22, 2019, 08:54:34 pm »
Hello guys!

I have just installed Code Blocks together with GNU GCC Compiler. However, when I tried building the first Hello-World program, it keeps showing me this message:

-------------- Build: Debug in test1 (compiler: GNU GCC Compiler)---------------

mingw32-make.exe -Wall -g  -c C:\ProgramData\test1\main.c -o obj\Debug\main.o
mingw32-g++.exe  -o bin\Debug\test1.exe obj\Debug\main.o   
mingw32-make.exe: invalid option -- g
mingw32-make.exe: invalid option -- c
Usage: mingw32-make.exe [options] [target] ...
Options:
  -b, -m                      Ignored for compatibility.
  -B, --always-make           Unconditionally make all targets.
  -C DIRECTORY, --directory=DIRECTORY
                              Change to DIRECTORY before doing anything.
  -d                          Print lots of debugging information.
  --debug[=FLAGS]             Print various types of debugging information.
  -e, --environment-overrides
                              Environment variables override makefiles.
  --eval=STRING               Evaluate STRING as a makefile statement.
  -f FILE, --file=FILE, --makefile=FILE
                              Read FILE as a makefile.
  -h, --help                  Print this message and exit.
  -i, --ignore-errors         Ignore errors from recipes.
  -I DIRECTORY, --include-dir=DIRECTORY
                              Search DIRECTORY for included makefiles.
  -j [N], --jobs[=N]          Allow N jobs at once; infinite jobs with no arg.
  -k, --keep-going            Keep going when some targets can't be made.
  -l [N], --load-average[=N], --max-load[=N]
                              Don't start multiple jobs unless load is below N.
  -L, --check-symlink-times   Use the latest mtime between symlinks and target.
  -n, --just-print, --dry-run, --recon
                              Don't actually run any recipe; just print them.
  -o FILE, --old-file=FILE, --assume-old=FILE
                              Consider FILE to be very old and don't remake it.
  -p, --print-data-base       Print make's internal database.
  -q, --question              Run no recipe; exit status says if up to date.
  -r, --no-builtin-rules      Disable the built-in implicit rules.
  -R, --no-builtin-variables  Disable the built-in variable settings.
  -s, --silent, --quiet       Don't echo recipes.
  -S, --no-keep-going, --stop
                              Turns off -k.
  -t, --touch                 Touch targets instead of remaking them.
  --trace                     Print tracing information.
  -v, --version               Print the version number of make and exit.
  -w, --print-directory       Print the current directory.
  --no-print-directory        Turn off -w, even if it was turned on implicitly.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                              Consider FILE to be infinitely new.
  --warn-undefined-variables  Warn when an undefined variable is referenced.
This program built for i686-pc-mingw32
Report bugs to <[email protected]>
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

When I try running the program, it tells me that it hasn't been built yet even though I have already clicked on the Build button, and the console doesn't show. I have tried auto-detecting the compiler, uninstalling and reinstalling Codeblocks but to no avail.
Please suggest a solution as I have been unable to write any programs for a while now.
Thanks,
Mehdi

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6664
    • My Best Post
Re: Process terminated with status 2 (0 minute(s), 0 second(s))
« Reply #1 on: October 23, 2019, 12:02:19 am »
Fix the toolchain settings; edit set the C Compiler to a valid C Compiler!

Edit2: Best guess mingw32-gcc.exe would be your C Compiler
« Last Edit: October 23, 2019, 12:53:05 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline mehdikhazane98

  • Single posting newcomer
  • *
  • Posts: 2
Re: Process terminated with status 2 (0 minute(s), 0 second(s))
« Reply #2 on: October 23, 2019, 01:37:23 am »
It worked! Thanks a lot for the help.