Roland said:
This is the expected (avoidance of an) answer in c.l.c++.
It's not avoidance. Either the entire code (including headers) should
be posted (which may or may not be appropriate), a snipped down version
(again, probably not appropriate) or it should be posted where those
files are topical.
The question however is: How do you handle name conflicts between
libraries
- that have no namespace and
- for which you cannot alter the source code?
An interesting question, IMHO.
Interesting it might be.
However, I can only assume that windows.h is the windows.h that I know,
although it hasn't been specified as such, it *could* be user defined.
I really have absolutely have no idea what allegro.h is, again, there
may be a file in the Windows API that has the same name, or it might be
part of another API.
Either way, these are both files which are platform/compiler/library
specific. If they have been used together before, then I would go to a
place where people who use the API more often, they are more likely to
know the answer to the name clash.
Back to the new topic you created, perhaps:
namespace allegro {
# include "allegro.h"
}
Would do it, that's pure speculation and if the library doesn't include
namespaces, then I very much doubt that identifiers are qualified to an
extent where that would come close to working.
Maybe some preprocessor trickery, include file, undo trickery. I don;t
know what the problems are.
Ben Pope