Building for 32 bit on 64 bit OS (-m32 linker not working)

CodeLite installation/troubleshooting forum
SamHyde
CodeLite Curious
Posts: 1
Joined: Mon Feb 12, 2018 12:29 am
Genuine User: Yes
IDE Question: C++
Contact:

Building for 32 bit on 64 bit OS (-m32 linker not working)

Post by SamHyde »

Hi there,

I'm on 64bit Ubuntu OS and I'm using the GCC compiler. I'm trying to build some C code at 32bit, Not 64bit. I have set my project settings to -m32 in my linker options. In my compiler options I have added -m32 for GCC as well. However, my code is still compiling to 64 bit. For example in ym disassembly the registers are shown as: 0x000000000040084e .

My registers also begin with r not e, example rbp is ebp, rsp is esp.

Is there something I am missing in my build options? How can I fix this?

I have attached screenshots as well.

Thanks for any help.
You do not have the required permissions to view the files attached to this post.