From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22527 invoked by alias); 16 Sep 2005 17:56:02 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 22511 invoked by uid 22791); 16 Sep 2005 17:55:58 -0000 Received: from mail-out4.apple.com (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 16 Sep 2005 17:55:58 +0000 Received: from relay5.apple.com (a17-128-113-35.apple.com [17.128.113.35]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id j8GHtuDm007867; Fri, 16 Sep 2005 10:55:56 -0700 (PDT) Received: from apple.com (Vpn0priv-40.apple.com [17.219.200.40]) by relay5.apple.com (Apple SCV relay) with ESMTP id 39E5A324014; Fri, 16 Sep 2005 10:55:56 -0700 (PDT) Date: Fri, 16 Sep 2005 17:56:00 -0000 Subject: Re: problems in C functions call C++ Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) Cc: gcc-help@gcc.gnu.org To: Tian Dale-A19565 From: Mike Stump In-Reply-To: <3BCB5FB76AFFF646BCFBC02A889B64F305E5B70A@ZCH07EXM05.corp.mot.com> Message-Id: <38ADA524-26DB-11DA-8F55-003065BDF310@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2005-09/txt/msg00104.txt.bz2 On Friday, September 16, 2005, at 10:01 AM, Tian Dale-A19565 wrote: > Functions (mentioned above, implemented in C++, called by C) were > unresolved, that means the linker cannot locate the implementation of > those functions. > > Could you help me to solve this problem? The ability to answer is dependent upon the quality of the question. If you case you removed all details that allow anyone from helping you. Compare your question to: When I compile: extern "C" void foo() { } I get: .public foo foo: ret at -O2 using gcc 3.4.3 on arm-elf and when I assemble this with binutils 2.904, nm shows no foo in the symbol table, is the compiler broken? Here we see the input to the compiler, the output from the compiler, the compilation flags used and so on... That has an answer, and it is no; further, we could say that as from binutils appears to be broken, and then have you go ask the binutils people about it. So, cut down the testcase to a small example, show us the full source code (gcc -E), the flags used to compile, the .s file produced and the name of the symbol in question...