PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

CRect::CRect already defined...

I get this problem only when compiling debug code on VS2003.

Code:

error LNK2005: "public: __thiscall CRect::CRect(struct tagRECT const &)" (??0CRect@@QAE@ABUtagRECT@@@Z) already defined in gapidraw.lib(GapiSurface.obj)


I'm using MFC in the same project that also has a CRect class, but why does this error only occur in debug mode with VS2003? It doesn't occur in release mode and not at all with Visual Studio 6.

/Tommy
I also get this error with the MFC sample after converting the project to Visual Studio 2003.

Release compiles and links, but not Debug.

/Tommy
The MFC-sample seems to work fine with VS 2003 if I use the specific Visual Studio 2003 Debug lib/dll.

But in my own project I'm using Unicode and the VS 2003 debug lib/dll does not seem to support Unicode.

Is there something I can do, or do I have to wait until a Unicode debug dll is released for VS 2003?

/Tommy
westernmost wrote:Check Proxy Professional (Socks)... blah blah blah


These idiots are almost as bad as the viagra spammers. I delete their crap posts from our site on a nearly daily basis.
GR: Thanks, I removed the post.

The rest of you who have issues with using MFC and GapiDraw. Don't use the file GapiDrawExtension.h - that's where CRect is defined. Or just comment out the definition of CRect and CPoint from GapiDrawExtension.h. That way it will work for you. :-)