Code::Blocks Forums

User forums => Help => Topic started by: Dako300 on September 11, 2012, 12:07:31 am

Title: Code Blocks and gcov.exe trouble.
Post by: Dako300 on September 11, 2012, 12:07:31 am
When I try and compile my project it says (in the build log):gcov.exe: option requires an argument -- s. That is when it is linking the .o files. I think Code::Blocks may be passing an invalid argument to the program. any help would be nice.
Title: Re: Code Blocks and gcov.exe trouble.
Post by: oBFusCATed on September 11, 2012, 12:14:40 am
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Title: Re: Code Blocks and gcov.exe trouble.
Post by: jarod42 on September 11, 2012, 12:55:21 pm
Note that gcov is not a compiler but a Test Coverage Program.
Title: Re: Code Blocks and gcov.exe trouble.
Post by: Dako300 on September 11, 2012, 02:48:19 pm
ok, I did that and the command is :gcov.exe  -o "bin\Release\program.exe" obj\Release\main.o obj\Release\core.o   -s
I think I need to remove the -s but how?

EDIT:If that is not the linker, is it possible to compile it without the program?
Title: Re: Code Blocks and gcov.exe trouble.
Post by: jarod42 on September 11, 2012, 03:18:31 pm
in Settings->Compiler and Debugger...:Global compiler settings

In linker settings, you may have the -s option (which is for stripping symbol with gcc)

In ToolChain executables, you should NOT have gcov anywhere.
(values would be :"gcc, g++, g++, ar, gdb, windres, make" (with possible prefix like mingw32-) for gcc compiler).

gcov is a program which tell you which part of your code has been executed,
it is neither a compiler nor a linker.
Title: Re: Code Blocks and gcov.exe trouble.
Post by: Dako300 on September 12, 2012, 03:14:01 am
Thank You!!! It works perfectly  :D