Results 1 to 1 of 1

Thread: Problem with gcc linker in 12.04

  1. #1
    Join Date
    Apr 2013
    Beans
    1

    Problem with gcc linker in 12.04

    I have problem with linking few .o files, i'm writing assembly and when i type this:
    Code:
     nasm -f elf first.asm
    nothing happens, so its good, it compiles driver.c too
    Code:
     gcc -c -m32 driver.c
    but when i try to link it
    Code:
     gcc -m32 -o first driver.o first.o asm_io.o
    i get this:
    Code:
    /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: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc
    /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc
    /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
    collect2: ld returned 1 exit status
    how can i solve this?
    Last edited by TripleQ; May 17th, 2013 at 11:01 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •