From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29516 invoked by alias); 27 Jan 2002 09:12:40 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29482 invoked from network); 27 Jan 2002 09:12:38 -0000 Received: from unknown (HELO mailFA7.rediffmail.com) (202.54.124.152) by sources.redhat.com with SMTP; 27 Jan 2002 09:12:38 -0000 Received: (qmail 7200 invoked by uid 510); 27 Jan 2002 09:13:15 -0000 Date: Sun, 27 Jan 2002 05:57:00 -0000 Message-ID: <20020127091315.7199.qmail@mailFA7.rediffmail.com> Received: from unknown (203.197.90.40) by rediffmail.com via HTTP; 27 Jan 2002 09:13:15 -0000 MIME-Version: 1.0 From: "ratnadeep joshi" Reply-To: "ratnadeep joshi" To: gcc@gcc.gnu.org Subject: c anc c++ compiling Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-SW-Source: 2002-01/txt/msg01748.txt.bz2 hello , =20=20 1. I compiled and linked two source files one=20=20=20=20=20=20=20 of which is c and other is c++ . I called=20=20=20=20=20=20=20=20 a function which was in c++ file from c file .=20=20=20 gcc flagged an error.. I gave : =20 $>gcc a.c a.cpp Error was : undefined reference to that=20=09 function =20=20=20 When i ran the same with g++ , it worked =20 $>g++ a.c a.cpp=20 =20 No error What happens exactly ? 2. Now i want to add c++ code to objc compiler=20=20=20=20 cc1obj . i.e i will link one more file which=20=09 is .cpp with other objc source files which are=20 .c . Here the same problem arises . The thing that we can't make here compiler=20=20=20=20 g++ as it happens through stages..and it=20=20=20=20=20=20=20 changes What can be done for this ? =20=20=20=20=20=20=20=20 Thanking you in anticipation ... =20 - Ratnadeep Joshi=20=20=20=20=20=20 =20