Compiling/testing in 32-bit on Ubuntu X86-64

Last update on November 17, 2009 08:49 AM by jak58
Published by netty5

Compiling/testing in 32-bit on Ubuntu X86-64






If you want compile a source code for testing purpose or to use it as a 32-bit binary,the main problem is that the headers of the standard library are not suitable for this purpose and that a version of the standard library in 32 bits is needed. (specific gcc library compiled in 32 bits).

To install these packages, type this command:
sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386


To compile your program so we were just attach the-m32:

gcc -m32 test.c -o test


This will be enough for a simple program using only the standard library but for programs using other libraries,all these libraries must be compile in 32-bit too.
Best answers for « Compiling/testing in 32 bit on Ubuntu X86 64 » in :
Compiling an assembly program with Nasm ShowCompiling an assembly program with Nasm Intro With LInux With Windows Intro Netwide Assembler (NASM) is an assembler and disassembler for the Intel x86 architecture and is commonly used to create 16-bit, 32-bit (IA-32) and 64-bit...
Converting a 32-bit integer into IP ShowConverting a 32-bit integer into IP Number to convert: 3265917058 Binary representation 11000010 10101001 11110000 10000010 - 3265917058 00000000 00000000 00000000 11000010 - 3265917058 >> 24 ( 194 ) 11000010 10101001 11110000...
Conversion of an IP address 32-bit ShowConversion of an IP address 32-bit We will make a ping kioskea.net in view retrieve the IP address (in bold) $ Ping-c1 kioskea.net PING kioskea.net (194,169,240,130) 56 (84) data bytes. 64 bytes from www.kisokea.org...
Download ATI Catalyst Software Suite for Vista (32 bit) ShowThe latest release for ATI drivers for windows Vista regrouping the following features and option: Catalyst Control Center Version 8.9 Radeon display driver 8.522 HydraVision WDM Driver Install Bundle Southbridge/IXP...
Download DirectX Vista ShowDescription Lately released, DirectX is very well known worldwide. The application is useful only on Microsoft Windows Vista. It automatically optimizes the graphic cards based on processors Nvidia GeForce or ATi. Advantage It allows game...
Rundll32 - rundll32.exe Showrundll32 - rundll32.exe rundll32.exe (rundll32 stands for Run a DLL as a 32-bit application) is a Windows NT/2000/XP generic process used for loading dynamic link libraries (DLLs) in memory so that other programs can use them. The file that...
PCI Bus ShowThe PCI Bus The PCI bus (Peripheral Component Interconnect) was developed by Intel on 22 June 1992. Contrary to the VLB bus, it is not so much a traditional local bus but rather an intermediate bus located between the processor bus (NorthBridge)...
Spool32 - spool32.exe Showspool32 - spool32.exe spool32.exe (spool32 stands for Windows Spooler 32-bit) is a Windows NT/2000/XP generic process which transparently manages printer queues. The process spool32 is not in any way a virus, a worm, a Trojan horse, spyware, or...