Author Topic: How set compiler flags? [gcc]  (Read 8310 times)

DFooz

  • Guest
How set compiler flags? [gcc]
« on: November 02, 2008, 05:25:40 pm »
I want to use -S flag in gcc to get assembler code. How can I set this flag? :Settings->Compiler->Other options: and write -S. But this doesn't work.

Online stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: How set compiler flags? [gcc]
« Reply #1 on: November 03, 2008, 01:43:50 am »
I want to use -S flag in gcc to get assembler code. How can I set this flag? :Settings->Compiler->Other options: and write -S. But this doesn't work.

It worked OK for me, did you check the output files?
The ASM source was in the .o files for me.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

DFooz

  • Guest
Re: How set compiler flags? [gcc]
« Reply #2 on: November 03, 2008, 04:20:42 pm »
When i write  -S I get this error /usr/bin/ld:/home/df/Desktop/asm/cpp/fun2.o|1|syntax error|
||=== Build finished: 1 errors, 0 warnings ===|

when `-S` or `S`:  Compiled good, but  .s file with ASM code wasn't created
when only S: Process terminated with status 1 (0 minutes, 0 seconds




 
« Last Edit: November 03, 2008, 04:37:03 pm by DFooz »