Remember the "-pg" option needs to be with both the compiler and the linker.
Edit:
My build and run logs; the gmon.out was created in the project folder. If you still have problems post the build log.
-------------- Build: Debug in profile_test (compiler: GNU GCC Compiler)---------------
x86_64-w64-mingw32-g++.exe -Wall -pg -fexceptions -g -Wmissing-include-dirs -DHAVE_TR1_TYPE_TRAITS -DGIT_BUILD -c C:\SourceCode\test\profile_test\main.cpp -o obj\Debug\main.o
x86_64-w64-mingw32-g++.exe -o bin\Debug\profile_test.exe obj\Debug\main.o -pg -lgmon -pg
Output file is bin\Debug\profile_test.exe with size 164.69 KB
Process terminated with status 0 (0 minute(s), 12 second(s))
0 error(s), 0 warning(s) (0 minute(s), 12 second(s))
-------------- Run: Debug in profile_test (compiler: GNU GCC Compiler)---------------
Checking for existence: C:\SourceCode\test\profile_test\bin\Debug\profile_test.exe
Executing: "C:\Program Files (x86)\CodeBlocks_13_12/cb_console_runner.exe" "C:\SourceCode\test\profile_test\bin\Debug\profile_test.exe" (in C:\SourceCode\test\profile_test\.)
Process terminated with status 0 (0 minute(s), 2 second(s))
Tim S.