Author Topic: Build is terminated with status 1 after rebuild  (Read 2648 times)

Offline ericjoe

  • Multiple posting newcomer
  • *
  • Posts: 11
Build is terminated with status 1 after rebuild
« on: September 11, 2015, 12:59:33 pm »
Hi, I opened a C++ project written by an ex-worker many years ago.

When I pressed "Build and run" from "Build" menu, the Code Block managed to run and an exe window shows up.

Then I pressed "Rebuild" from "Build" menu. I received a pop-up window saying "Rebuild project" and I click "Yes".

I got an error message from "Build log".
Code
-------------- Build: Debug in MERIT (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g -I..\..\..\..\MinGW\include -I"C:\Program Files\CodeBlocks\include" -I"C:\Program Files\CodeBlocks\" -I"C:\Program Files\CodeBlocks\include" -c C:\Working_Place_Joe\MERIT_Black_Box\Latest_Build_09012012\Calcs.cpp -o obj\Debug\Calcs.o
mingw32-g++.exe: error: Files\CodeBlocks\include -c C:\Working_Place_Joe\MERIT_Black_Box\Latest_Build_09012012\Calcs.cpp -o obj\Debug\Calcs.o: Invalid argument
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I have searched the forum and found another similar problem in a http://forums.codeblocks.org/index.php/topic,9032.msg64952.html#msg64952

Can anyone shed some light on where should I start to solve the error message above?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Build is terminated with status 1 after rebuild
« Reply #1 on: September 11, 2015, 01:43:35 pm »
Try to remove the trailing backslash from
Code
-I"C:\Program Files\CodeBlocks\"
It's most likely in the projects setup (search path of compiler), look into the settings for the project and the target.
Might also be in the global compiler settings ("Settings -> Compiler").

In any case: in this folder there are normally no header-files, so there is no need to include it anyway. The same is for the folders below it.

Offline ericjoe

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Build is terminated with status 1 after rebuild
« Reply #2 on: September 11, 2015, 02:18:53 pm »
I have removed the trailing backslash at Global Variable Editor -> base for "boost" Current Variable.

The error message goes away. Good news.

Bad news is I got error message saying:
Code
-------------- Build: Debug in MERIT (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g -I..\..\..\..\MinGW\include -I"C:\Program Files\CodeBlocks" -I"C:\Program Files\CodeBlocks\include" -I"C:\Program Files\CodeBlocks\include" -c C:\Working_Place_Joe\MERIT_Black_Box\Latest_Build_09012012\CongestedArea.cpp -o obj\Debug\CongestedArea.o
In file included from C:\Working_Place_Joe\MERIT_Black_Box\Latest_Build_09012012\GridArea.h:28:0,
                 from C:\Working_Place_Joe\MERIT_Black_Box\Latest_Build_09012012\CongestedArea.h:23,
                 from C:\Working_Place_Joe\MERIT_Black_Box\Latest_Build_09012012\CongestedArea.cpp:19:
C:\Working_Place_Joe\MERIT_Black_Box\Latest_Build_09012012\DatabaseIO.h:33:38: fatal error: boost/algorithm/string.hpp: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I had followed the steps in http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef#Build_Boost

I have attached screenshot of my project settings:




Do you know what mistakes I have made?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3288
Re: Build is terminated with status 1 after rebuild
« Reply #3 on: September 12, 2015, 07:49:03 pm »
The error message tells you clearly that you are missing the boost headers... So search the boost headers on your system and add them to your project search path...
As i can see from your screen shots you are using Global Variables to add the boos library so you have to go to Settings->Global Variables->Current Variable=boost and fill the base, include and lib paths with the correct location of your bosst installation...

greetings