Author Topic: Code Blocks and gcov.exe trouble.  (Read 4779 times)

Offline Dako300

  • Single posting newcomer
  • *
  • Posts: 3
Code Blocks and gcov.exe trouble.
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jarod42

  • Multiple posting newcomer
  • *
  • Posts: 87
Re: Code Blocks and gcov.exe trouble.
« Reply #2 on: September 11, 2012, 12:55:21 pm »
Note that gcov is not a compiler but a Test Coverage Program.

Offline Dako300

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code Blocks and gcov.exe trouble.
« Reply #3 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?

Offline jarod42

  • Multiple posting newcomer
  • *
  • Posts: 87
Re: Code Blocks and gcov.exe trouble.
« Reply #4 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.

Offline Dako300

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code Blocks and gcov.exe trouble.
« Reply #5 on: September 12, 2012, 03:14:01 am »
Thank You!!! It works perfectly  :D