OT: c++ q
Erez D
erez0001 at gmail.com
Sun Apr 26 17:14:09 IDT 2009
On Sun, Apr 26, 2009 at 5:04 PM, Erez D <erez0001 at gmail.com> wrote:
>
>
> On Sun, Apr 26, 2009 at 4:07 PM, Shachar Shemesh <shachar at shemesh.biz>wrote:
>
>> Erez D wrote:
>>
>>
>>
>> you are right. i just wanted to give a small example instead of send my
>> whole project to be inspected.
>>
>> Which I doubt anyone would.
>>
> i would not send my whole project as this is spamming (and other reasons
> too)
>
>>
>> however after fixing the syntax of this small example, i can't seem to
>> duplicate the problem that happened in the project.
>>
>> A clear symptom that the problem is not what you think it is.
>>
>> Try using "-E" on gcc - it tells it to run the C preprocessor and stop.
>> Inspect the resulting file - it may reveal the problem.
>>
> I should be so lucky ...
> as i have no #defines whatsoever, the preprocessor output was exactly what
> i expected.
>
> i found some voodoo though:
> > g++ -E -I . -c source/myclass.cpp > x.cpp
> > g++ -c x.cpp
> works fine,
> however:
> > g++ -I . -c source/myclass.cpp
> returns a "redefinition of ..." error
>
the "funny" is that it does compile on my other computer without any
problems
so :
i get an error on jaunty - gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
it compiles cleanly on intrepid - gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)
>
>
>
>
>>
>> Shachar
>>
>> --
>> Shachar Shemesh
>> Lingnu Open Source Consulting Ltd.http://www.lingnu.com
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090426/883cdd91/attachment.html>
More information about the Linux-il
mailing list