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".
-------------- 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 (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?
Try to remove the trailing backslash from
-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.
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:
-------------- 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 (http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef#Build_Boost)
I have attached screenshot of my project settings:
(http://s13.postimg.org/49r7rsvqv/Project_1.png)
(http://s1.postimg.org/k639ju11b/Project_2.png)
(http://s11.postimg.org/4no5bp5df/Project_3.png)
Do you know what mistakes I have made?