Author Topic: "Error: Invalid Instruction for push" c++ hello world  (Read 4373 times)


  • Guest
"Error: Invalid Instruction for push" c++ hello world
« on: September 20, 2015, 02:36:47 pm »
Hello, I am very new coding so please forgive me  :'( :'( .  I first installed code::blocks then I installed minigw. I tried to run a hello world and got the "gcc error createprocess no such file or directory" even though I made sure that the environmental path and minigw are correctly installed.

So I gave up and installed tdm-gcc. I made a c++ hello world but got the error "Error: Invalid Instruction for push"

This is what the log says:
||=== Build: Debug in Project one v2 (compiler: GNU GCC Compiler) ===|
C:\Users\JIBZOI~1\AppData\Local\Temp\cc3omyxM.s|20|Error: invalid instruction suffix for `push'|
C:\Users\JIBZOI~1\AppData\Local\Temp\cc3omyxM.s|21|Error: invalid instruction suffix for `push'|
C:\Users\JIBZOI~1\AppData\Local\Temp\cc3omyxM.s|24|Error: invalid instruction suffix for `push'|
C:\Users\JIBZOI~1\AppData\Local\Temp\cc3omyxM.s|55|Error: invalid instruction suffix for `push'|
C:\Users\JIBZOI~1\AppData\Local\Temp\cc3omyxM.s|75|Error: invalid instruction suffix for `push'|
C:\Users\JIBZOI~1\AppData\Local\Temp\cc3omyxM.s|105|Error: invalid instruction suffix for `push'|
||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

Please help me, did I do something wrong in the process?

EDIT: btw my compiler is set to gnu gcc compiler, i cant find the tdm-gcc at the settings, if so please tell me how to set tdm-gcc as default compiler

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: "Error: Invalid Instruction for push" c++ hello world
« Reply #1 on: September 20, 2015, 04:25:41 pm »
Something is broken in the compiler.
Verify that compiling from the command line works.
Also make sure that the settings -> compiler -> your compiler -> toolchain executables are set correctly.

Keep in mind that both mingw and tdm are windows builds of the GCC compiler, so they are treated as GCC by code::blocks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2987
Re: "Error: Invalid Instruction for push" c++ hello world
« Reply #2 on: September 20, 2015, 05:17:11 pm »
and post the build log from the build log tab... (but first make e rebuild, the blue round arrow)