User forums > General (but related to Code::Blocks)

Adding inline asm allways generates an error

(1/1)

typicalc:
I have trouble making GCC compile som additional ASM
The source is C and it has this test line:
asm("movl $0, %eax\n\t");

I get an error:
C:\Users\joe\AppData\Local\Temp\cc34a8K4.s|34018|Error: no such instruction: `movl $0,%eax'|

When I compile and link from command line it compiles and link fine. If I compile & link using "-masm=intel" the compiles fails with the same error.
SO I suspect I have "-masm=intel" setting somewhere in Codeblocks. Where is it? I searched "Project build options" and "Settings- compiler setting" but there was nothing about this.

Do I need some other setting or #include ?

stahta01:
Are you positive you are using the exact same compiler inside Code::Blocks and on the command line?

Tim S.

typicalc:
Ok I found a solution. I manually edited the cbp file and took out the offending "masm=intel"

Navigation

[0] Message Index

Go to full version