Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8111737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:13:55+00:00 2026-06-06T02:13:55+00:00

I am using ubuntu 12.04 on 64 bit machine, I have this simple C

  • 0

I am using ubuntu 12.04 on 64 bit machine, I have this simple C code:

 int b = 20;
 int c = 10;

 int main(int argc, char **argv) {
      c = 50;
 }

I was trying make it compatible with any IA32 machine by compiling it like this:

 unix> gcc -m32 code.c

And got these errors:

 /usr/bin/ld: cannot find crt1.o: No such file or directory
 /usr/bin/ld: cannot find crti.o: No such file or directory
 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
 /usr/bin/ld: cannot find -lgcc
 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
 /usr/bin/ld: cannot find -lgcc_s
 /usr/bin/ld: cannot find -lc
 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
 /usr/bin/ld: cannot find -lgcc
 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
 /usr/bin/ld: cannot find -lgcc_s
 /usr/bin/ld: cannot find crtn.o: No such file or directory
 collect2: ld returned 1 exit status

As I understand, this is happening because I’m missing 32 bit standard C library, so linker cannot link my code against standard C library.

How can I obtain the needed 32 standard C on my 64 bit machine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:13:57+00:00Added an answer on June 6, 2026 at 2:13 am

    Try this:

      apt-get install ia32-libs 
    

    Also, you should compile/link with -m32:

    gcc -Wall -pedantic -m32 ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to compile the following code on Ubuntu (64-bit), with Code::Blocks 10.05
I am using Eclipse on a 32-bit Ubuntu virtual machine to work on a
I'm using GCC 4.3.3 on Ubuntu 9.04 64-bit and was getting errors using C++-style
I am currently using Ubuntu 11.10 and java SE 1.6.0_26. I am trying to
I am using ubuntu 12.04 and Qt Creator 2.4.1. It builds my C code
I am using Ubuntu 12.04 and I am trying to install pcre. However I
I'm using Ubuntu and Qt Creator 4 I have a .cpp program in the
I am trying to install glibc 2.3.2 on my Ubuntu using gcc v3.4.6, but
I'm using emacs23 on Ubuntu 32-bit 10.04/10.10 with GNOME and Compiz. Pressing M-RET in
I'm running on 64-bit Ubuntu, and trying to get DMD v2.052 to work with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.