Well we can easily check this by the following program. However, if automatic detection window doesnt appear then follow the below steps. Conditional compiler flags for different OS. How to check whether a program is compiled with 32-bit after adding a â-m32â flag? Answer (1 of 2): While you install CodeBlocks, the default compiler auto detected is GNU GCC Compiler. If you click the Other Compiler Options tab, you can enter switches manually. The Global Compiler Settings screen is chosen, Compiler Settings tab, Compiler Flags sub-tab set as shown in Figure 1. To summon the Compiler Settings dialog box, choose Settings, Compiler in Code::Blocks. In that case you must install gcc-multlib by using the following command:Īfter that you will be able to compile a 32-bit binary on a 64-bit system. Setting compiler options in Code::Blocks (click to embiggen). Then it indicates that a standard library of gcc is been missing. For instance, to compile a file of geek.c through Linux terminal, you must write the following command with -m32 flag.įatal error: bits/predefs.h: No such file or directory Now in order to compile with 32-bit gcc, just add a flag -m32 in the command line of compiling the âCâ language program. Hence the fourth line Target: x86_64-linux-gnu confirms that we are running 64-bit gcc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |