I’ve been experiencing a nasty issue with profiling on Windows. But first, the context of setup:

I created a shared sandbox in ~/dev/foo_shared: cabal sandbox init --sandbox=.

I created a sandbox in ~/dev/foo using the shared sandbox above: cabal sandbox init --sandbox=~/dev/foo_shared

I installed all the dependencies with profiling enabled: cabal install --only-dependencies --enable-library-profiling --enable-executable-profiling

I configured the foo package so that it includes profiling RTS: cabal configure --enable-profiling --enable-executable-profiling

I tried to build with cabal build

Everything builds up correctly, but doesn’t link. I then rebuilt with cabal build -v3 , and this is the linker part (the most interesting part):

c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lHSrts_debug_p

I googled that, and IIRC, it’s because I lack the profiling library for the GHC’s RTS. I never found it for Windows :( Last information, I’m on Windows 10, not sure it helps though.