Gcc use problems help: "incompatiblewithi386: x86-64output"

Source: Internet
Author: User
Gcc use questions help: & quot; incompatiblewithi386: x86-64output & quot; -- Linux general technology-Linux technology and application information, the following is a detailed reading. When I use a static library for programming, input the following content in the book:

"Gcc-o usehello_static usehello. c libhello."

Result prompt:

"/Usr/bin/ld: i386 architecture of input file 'libhello. a (libhello. o) 'is incompatible with i386: x86-64 output
Collect2: ld returns 1"

No execution file is generated. How can this problem be solved? (5ty (




------------------------


I installed ubuntu7.10 for amd64 in vmware. In addition, both the library file and the c source file are from the attached CD of this book.


My CPU is: AMD Athlon (tm) 64*2 Dual Core Processor 4200 + 2.20 GHz

Gcc version 4.1.3

Gcc manual has hundreds of pages and does not know where to look for reference.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.