2

I would like to profile my application using Valgrind but I cannot find a tutorial on how to do it on Windows.

When I try to open my app with

valgrind -v ./ThreadClass.exe

i get

valgrind: ./ThreadClass.exe: cannot execute binary file

So the error is different than in those subjects:

'Valgrind does not work with WSL?'

'How to use Valgrind on Windows'

As it states in one of the answers in 'Valgrind does not work with WSL?' it should work with the newest version of Windows 10 (creators update).

Can someone explain to me, how to profile an application with Valgrind on Windows 10?

Do I need to compile my application for linux to run it with Valgrind in WSL (Windows Subsystem for Linux)?

Szpaqn
  • 545
  • 5
  • 17

1 Answers1

1

Valgrind in WSL only works with linux binaries, not windows ones. If you recompile your binary for linux, you should be able to run valgrind on that.

chacham15
  • 13,719
  • 26
  • 104
  • 207