u19809 <[EMAIL PROTECTED]> writes:
> 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.
They don't do that.
What they do do is prevent creating of template instantiations
('#pragma interface') even when compiler could have created them.
The '#pragma implementation' undoes the effect of '#pragma interface'.
> So Question now remains why does the #pragma things break compile when the
> source file is in a different location as the header
Reading 'info gcc' reveals the answer:
If you use `#pragma implementation' with no argument, it applies to
an include file with the same basename(1) as your source file.
For example, in `allclass.cc', giving just `#pragma implementation'
by itself is equivalent to `#pragma implementation "allclass.h"'.
So the problem is not that you copied WxAction.cpp into a different
location (that would have worked); the problem is that you also
renamed that file to WxAction_A.cpp
Cheers,
P.S. You probably should remove these pragmas altogether -- they
probably provide minimal disk space savings (none in the final
executable, but some savings in intermediate object files), but
cause headaches and aren't portable either.
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus