Andreas Bigger
Andreas Bigger

Reputation: 5560

valgrind: –-tool=memcheck: command not found

I ran this command in terminal, with the correct directory specified (also compiled with executable available):

valgrind –-tool=memcheck –-leak-check=yes ./somefile

An error is returned:

valgrind: –-tool=memcheck: command not found

Is this an issue with my installation of Valgrind?

Upvotes: 1

Views: 3017

Answers (1)

melpomene
melpomene

Reputation: 85827

–-tool

is wrong. It should be

--tool

The difference: In your version the first character is not a minus, but a U+2013 EN DASH.

That's why valgrind doesn't recognize it as the start of an option, but thinks –-tool=memcheck is the name of a command to run (with –-leak-check=yes ./somefile being the command line arguments).

Upvotes: 4

Related Questions