Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mmkider on May 26, 2009, 07:59:54 am

Title: Can I redirect output to files in the compiler line marco window?
Post by: mmkider on May 26, 2009, 07:59:54 am
I write this command in the advanced compiler option
Code
       arm-elf-nm -s $file_name.o > $file_name.h

I always get this info.How can I redirect output to files?
Quote
         arm-elf-nm: '>': No such file
          arm-elf-nm: 'abc.h': No such file

Best regards.
Title: Re: Can I redirect output to files in the compiler line marco window?
Post by: mariocup on May 26, 2009, 09:51:53 am
Hi mmkider,

you should use this command in a post-build step like

Code
cmd /c arm-elf-nm -s ....

What is your intension? Do you want to get the symbols from the object files or the resulting executable.
Keep in mind that in a final link pass the address of symbols (resulting executable) may differ from the address in the single object files, since the object files contain relocation information which is resolved by the linker and the corresponding linker description file.

 
Title: Re: Can I redirect output to files in the compiler line marco window?
Post by: mmkider on May 26, 2009, 10:22:59 am
Hi mmkider,

you should use this command in a post-build step like

Code
cmd /c arm-elf-nm -s ....

What is your intension? Do you want to get the symbols from the object files or the resulting executable.
Keep in mind that in a final link pass the address of symbols (resulting executable) may differ from the address in the single object files, since the object files contain relocation information which is resolved by the linker and the corresponding linker description file.



Because I have a very special file. I want to auto compile this file, so I need get expansive file.ext.
Thank you. I will try it.

http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system