From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28535 invoked by alias); 2 Jul 2005 16:10:54 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 28524 invoked by uid 22791); 2 Jul 2005 16:10:48 -0000 Received: from norbert.ecoscentric.com (HELO smtp.ecoscentric.com) (194.153.168.165) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 02 Jul 2005 16:10:48 +0000 Received: by smtp.ecoscentric.com (Postfix, from userid 99) id 3D1E765C082; Sat, 2 Jul 2005 17:10:46 +0100 (BST) Received: from delenn.bartv.net (localhost [127.0.0.1]) by smtp.ecoscentric.com (Postfix) with ESMTP id 808E365C057; Sat, 2 Jul 2005 17:10:43 +0100 (BST) To: clifford.joseph@clarinox.com Cc: ecos-discuss@ecos.sourceware.org In-reply-to: <959e269faa6545069d922c92830300ba.clifford.joseph@clarinox.com> From: Bart Veer References: <959e269faa6545069d922c92830300ba.clifford.joseph@clarinox.com> Message-Id: <20050702161043.808E365C057@smtp.ecoscentric.com> Date: Sat, 02 Jul 2005 16:10:00 -0000 Subject: Re: [ECOS] i2c bit-banging implementation X-SW-Source: 2005-07/txt/msg00022.txt.bz2 >>>>> "Clifford" == writes: Clifford> Thank you for the reply Clifford> I am sending you the exact information printed after Clifford> compiling Clifford> L2CapDataClientMain=2Ecpp is where main() is Clifford> i have compiled the code with g++ -E -g Clifford> this is the message i get As Andrew has already said, this is not exactly what I had in mind. However I think I have now figured out what the problem is. The I2C macros use the gcc designated inits language extension, and it turns out that g++ does not implement this extension, This is a rather unfortunate discrepancy, but may be inevitable because of the differences in language syntax. If I try to instantiate an I2C bus or device in C++ code I get errors like: i2c.cxx:154: error: expected primary-expression before '.' token Not quite the error message you are seeing, but we may be using different versions of the compiler. The solution for now is to instantiate the I2C bus and devices in C code instead of C++. Bart -- Bart Veer eCos Configuration Architect http://www.ecoscentric.com/ The eCos and RedBoot experts -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss