[sword-devel] Conflicts with class POSITION

Todd Shirey sword-devel@crosswire.org
Tue, 3 Apr 2001 14:00:45 -0400


Add the following to stdafx.h:

#define __VCBUILD__

or define __VCBUILD__ in the preprocessor directives.

-----Original Message-----
From: owner-sword-devel@crosswire.org
[mailto:owner-sword-devel@crosswire.org]On Behalf Of
Sent: Tuesday, April 03, 2001 12:43 PM
To: sword-devel@crosswire.org
Subject: [sword-devel] Conflicts with class POSITION

Hello all,
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.
In Christ,
David Trotz