Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - _XTP_EXT_CLASS CXTPZipMemFile
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

_XTP_EXT_CLASS CXTPZipMemFile

 Post Reply Post Reply
Author
Message
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Topic: _XTP_EXT_CLASS CXTPZipMemFile
    Posted: 24 February 2009 at 10:52pm
I just pulled 13.0.0.  My first project barked at me with this error. 
y:\codejock\source\common\XTPSystemHelpers.h(847) : error C2220: warning treated as error - no 'object' file generated
y:\codejock\source\common\XTPSystemHelpers.h(847) : warning C4275: non dll-interface class 'CMemFile' used as base for dll-interface class 'CXTPZipMemFile'
        D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afx.h(1177) : see declaration of 'CMemFile'
        y:\codejock\source\common\XTPSystemHelpers.h(846) : see declaration of 'CXTPZipMemFile'
I see that _XTP_EXT_CLASS expands to _declspec(dllimport) in the CXTPZipMemFile declaration.  What I don't see is what to do about it.  Any hints as to what is going on?
--Mike
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2009 at 2:03am
Hi,
 
_XTP_EXT_CLASS  can't be reason. As you see all our classes declared with _XTP_EXT_CLASS.  Maybe you already have CXTPZipMemFile in your sources... or something.
 
... or maybe you inserted XTPSystemHelpers.h to your project directly.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2009 at 6:41pm
I figured it out.  It was pretty obscure.  We actually have a header, ca_afx.h, that we use in place of afx.h.  Its purpose is to suppress a lot of the Coding Analysis warnings that would otherwise be seen in afx.h.  We're a large shop, and I didn't know that had been done until I started chasing this down.  Here's the file in its entirety:
 

#include <CodeAnalysis/warnings.h>

#pragma warning(push)

#pragma warning(disable: ALL_CODE_ANALYSIS_WARNINGS)

#include <afx.h>

#pragma warning(pop)

 
The included file CodeAnalysis/warnings.h from Microsoft defines ALL_CODE_ANALYSIS_WARNINGS to be a long list of numbers (that doesn't include 4275).  In fact, if you go into the Codejock RibbonSample's stdafx.h and replace the afx* headers with the code above, the same warning I originally cited is generated, along with one other (4251). 
 
The problem is that final "pop" call.  It turns out that inside afx.h, a number of warnings, including 4275, are normally disabled and left that way, and our pop was re-enabling them.
 
Now, as to why this showed up in 13 but not 12, I haven't figured that one out.  I see that XTPResourceManager.h also suppresses these warnings, so my guess is that something changed up the include tree in 13 such that those don't come into play anymore.  Maybe.  Either way, I have modified our ca_afx.h to re-disable the warnings and I'm a happy Codejocker again.
 
--Mike
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2009 at 3:46am
ok :)
Thanks for let us know... for future questions.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.