News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How set compiler flags? [gcc]

Started by DFooz, November 02, 2008, 05:25:40 PM

Previous topic - Next topic

DFooz

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.

stahta01

Quote from: DFooz 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.

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

DFooz

#2
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