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

RE: [XaraXtreme-dev] includes, XARLIB and camtypes.h

Yes, if bar.cpp is a part of XarLib then foo.h will also be and it
should be included outside of the conditional in camtypes.h.

There may be cpp files or other header files that conditionally include
stuff (e.g. if XarLib doesn't need a large chunk of a class then I may
have conditionally included headers that are only used by the bits that
aren't needed) but again, these should be movable to inside the
conditional in camtypes.h.

I would say, that by default, when adding an include to camtypes.h, it
should be added outside the conditional and I will fix any issues that
crop up when I update XarLib from the latest XaraLX code.  This should
simply involve me moving non-XarLib includes into the conditional.

There shouldn't currently (well, before your checkins) be any headers
inside the conditional that are in XarLib but if there are then it
shouldn't compile if the includes in the cpp files have been removed so
I should spot them very easily when updating XarLib.

Yes, I will move any of the new headers you have added inside the
conditional to outside it if required.

Incidentally, I believe the only files you've changed that are part of
XarLib are camtypes.h and errors.cpp and simply moving the include of
paldefs.h to inside the conditional (as it is not a part of XarLib)
allows it to compile a release build ok.  I'm just testing the debug
build but I don't anticipate any further problems...


-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Alex Bligh
Sent: 09 June 2006 10:16
To: dev@xxxxxxxxxxxxxx
Cc: Alex Bligh
Subject: RE: [XaraXtreme-dev] includes, XARLIB and camtypes.h


It's not the conditional itself that is causing the problem. Let's
say foo.h in included in camtypes, but inside the conditional.
If bar.cpp currently includes foo.h, and I remove that include,
then bar.cpp (which needs foo.h) will not compile with XARLIB defined.

However, if you have excluded those files precisely because XarLib
doesn't include them anyway, then bar.cpp wouldn't have compiled
anyway (as the file would have been missing). So we've lost nothing.


The only danger is if you put something INSIDE the conditional which IS
used by XARLIB. Were those the ones you were proposing to move? In which
case yes that should fix it.