I tried to add -Wl -Map=main.map ( -Wl -Map main.map [and] -Wl, -Map=main.map) to project->build options->link settings->other link option , but all failed.
After compiled , I got message:
-------------- Build: Debug in testrc ---------------
Compiling: main.cpp
Compiling: imgproc.rc
Linking dynamic library: bin\Debug\testrc.dll
g:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: : No such file: No such file or directory
collect2: ld returned 1 exit status
mingw32-g++.exe: unrecognized option '-Map=main.map'
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
------------------------------------------
the map file does not exist .