[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: moving a file with template code to another directory breaks compile

From: u19809
Subject: Re: moving a file with template code to another directory breaks compile -- more info
Date: Thu, 30 Mar 2006 00:04:08 +0200
User-agent: Pan/ (As She Crawled Across the Table (Debian GNU/Linux))

On Tue, 28 Mar 2006 21:17:21 -0800, Paul Pluzhnikov wrote:

> u19809 <> writes:
>> I have made a program without templates and that does not work either
> The way your command lines are wrapped makes it very difficult to
> compare them. Reformatting, I find that your compile and link
> lines are different, and that you've omitted part of the first
> link line.
> Some of the differences (bad compile is marked '<', good with '>'):
> < -I/usr/lib/gtk-2.0/include
>> -I/usr/include/gtk-2.0/include
> < -I/usr/include/cairo
> < -I/usr/include/pango-1.0
>> -I/usr/include/pango-1.2
> < -I/usr/lib/glib-2.0/include
>> -I/usr/include/glib-2.0/include
>> -I/usr/include/freetype2
> Now, it may be that these differences don't matter.
> But you claimed that the *only* thing different was the location of
> the source, and that appears to be a falsehood.
> Since you already "lied" once, I don't know how much trust to put
> into your statement that there are no significant differences between
> the preprocessed files.
> There is probably quite rational explanation to what you are
> observing. I suggest you start by moving just one file from original
> location to the new location, compiling it with the *exact* same
> command (you may need to adjust -I though), and convince yourself
> that the set of symbols in the object is exactly the same.

I found in the meantime a way to make it compile but cannot explain why
the workaround fixes things

The code I had contains #pragma implementation and #pragma interface in
the header file.  This matches my findings since these pragma's do
something with respect to copying header information or not.

If I remove both pragma's (which should be there in the first place)
things compile with the command options as cut and pasted.

That the lines are not identical is correct but I wanted to post the
original ones.  I also tried with really character per character lines
except for the location of the .cpp file (as in the example I pasted) and
that did not work.  

So Question now remains why does the #pragma things break compile when the
source file is in a different location as the header

> Cheers,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]