OT: c++ q
Erez D
erez0001 at gmail.com
Sun Apr 26 17:04:17 IDT 2009
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
>
> 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/47a3759a/attachment.html>
More information about the Linux-il
mailing list