User forums > Help
redirect output of post-build step
tom0769:
I am using CodeBlocks with mingw installed on a Win XP system.
I want to output all symbols of a debug exe to a file to parse it for later use.
I found that the binutil "nm.exe" does the job pefectly for me.
With the following command executed in the command shell, I can output the symbol table to a file:
"nm.exe .\bin\Debug\LT_Simulation.exe > symbols.txt"
Now I want to do this as a post-build step (Project - Build options - Pre/post build steps).
The nm-command works, but the output always goes to the build log window.
How can I redirect this to a file?
oBFusCATed:
You can make a bat file and execute it as post build step.
There is a possibility to write a shell script, but it is harder to setup (I think)
MortenMacFly:
--- Quote from: tom0769 on September 16, 2010, 08:53:08 am ---How can I redirect this to a file?
--- End quote ---
Use the tools menu. Setup a tool (like a script or batch file) that does the re-direction. Use macros in the tool so that it is generic enough to work with any of your applications.
--- Quote from: tom0769 on September 16, 2010, 08:53:08 am ---"nm.exe .\bin\Debug\LT_Simulation.exe > symbols.txt"
--- End quote ---
Are you aware that there is a symbol table plugin - the frontend to nm???
oBFusCATed:
Morten: can you execute a tool in a post build step?
MortenMacFly:
--- Quote from: oBFusCATed on September 16, 2010, 10:12:18 am ---Morten: can you execute a tool in a post build step?
--- End quote ---
No, but I can press the entry in the tools menu after the compilation. :-)
It might be possible to do the thing I've described using scripting in the post-build step though...
However, adding the ability to launch a tool (with a specific ID) from within the pre- post-build steps might be worth a thought though...
Navigation
[0] Message Index
[#] Next page
Go to full version