[sword-devel] Conflicts with class POSITION
Tue, 3 Apr 2001 14:00:45 -0400
Add the following to stdafx.h:
or define __VCBUILD__ in the preprocessor directives.
[mailto:email@example.com]On Behalf Of
Sent: Tuesday, April 03, 2001 12:43 PM
Subject: [sword-devel] Conflicts with class POSITION
Lastnight I began playing with the Sword libraries and MFC. I was seeing how
I can get the two to communicate intelligently. I got the Sword.dll to
compile fine. I could even link into the dll using a simple console
application. But when I tried to link the Sword.dll to an application that
uses MFC I got an error. I don't have the error here with me, but the error
was from a conflict with the class POSITION. I could overcome it by renaming
the class and every reference to it as SWPOSITION. Then it would compile and
I could play around with it from there.
My question is: Has anyone run into this error before and is there a
workaround besides renaming the class POSITION? If not would it be possible
to maybe place the entire Sword Class library in it's own namespace to keep
from further name conflicts? I am still very new to C++ so I don't know if
this is a valid fix, but I hate to have to rename every instance of the
POSITION class each time I update my source code from the cvs. Any ideas and
help would be greatly appreciated.