Print Page | Close Window

how to compile a MFC Project with codejock!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23298
Printed Date: 27 April 2024 at 11:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to compile a MFC Project with codejock!
Posted By: Paulis23
Subject: how to compile a MFC Project with codejock!
Date Posted: 29 March 2017 at 4:26am
Hi codejock team any idea whats going wrong here?
we kann not compile the project with witch error:

XTPCustomHeap.h(373): error C2059: syntax error : 'string'
XTPCustomHeap.h(447) : see reference to class template instantiation 'CXTPHeapObjectT<_TObject,_TAllocator>' being compiled
XTPCustomHeap.h(374): error C2091: function returns function
XTPCustomHeap.h(374): error C2802: static member 'operator new' has no formal parameters
\Common/XTPCustomHeap.h(374): error C2333: 'CXTPHeapObjectT<_TObject,_TAllocator>::operator new' : error in function declaration; skipping function body
\Common/XTPCustomHeap.h(422): error C2059: syntax error : 'string'
\Common/XTPCustomHeap.h(423): error C2091: function returns function
\Common/XTPCustomHeap.h(423): error C2802: static member 'operator new' has no formal parameters
\Common/XTPCustomHeap.h(423): error C2333: 'CXTPHeapObjectT<_TObject,_TAllocator>::operator new' : error in function declaration; skipping function body
\Common/XTPCustomHeap.h(1050): error C2059: syntax error : 'string'
\Common/XTPCustomHeap.h(1109) : see reference to class template instantiation 'CXTPBatchAllocObjT<_TObject,_TBatchAllocData,_TAllocator>' being compiled
\Common/XTPCustomHeap.h(1051): error C2091: function returns function
\Common/XTPCustomHeap.h(1051): error C2802: static member 'operator new' has no formal parameters
\Common/XTPCustomHeap.h(1051): error C2333: 'CXTPBatchAllocObjT<_TObject,_TBatchAllocData,_TAllocator>::operator new' : error in function declaration; skipping function body
\Common/XTPCustomHeap.h(1090): error C2059: syntax error : 'string'
\Common/XTPCustomHeap.h(1091): error C2091: function returns function
\Common/XTPCustomHeap.h(1091): error C2802: static member 'operator new' has no formal parameters
\Common/XTPCustomHeap.h(1091): error C2333: 'CXTPBatchAllocObjT<_TObject,_TBatchAllocData,_TAllocator>::operator new' : error in function declaration; skipping function body

We use XTP 17.3 with VS 2013.

Please help!



Replies:
Posted By: olebed
Date Posted: 29 March 2017 at 6:32am
Hello,

Please describe how you create project, what settings ?

Regards,
 Oleksandr Lebed


Posted By: Paulis23
Date Posted: 29 March 2017 at 8:24am
Hello, we use this settings from Codejock:
Build As static library - for applications using MFC as static library
Character Support:
Unicode and plattform Win32.


and with this settings in StdAfx.h we have included this files in the Project:
//======== Codejock 17.3===========
//#define _XTP_INCLUDE_DEPRECATED
//#define _XTP_EXCLUDE_COMMON
//#define _XTP_EXCLUDE_TABMANAGER
//#define _XTP_EXCLUDE_CONTROLS
//#define _XTP_EXCLUDE_COMMANDBARS
//#define _XTP_EXCLUDE_DOCKINGPANE
// Lets help compiler to skip some headers
#define _XTP_EXCLUDE_CHART
#define _XTP_EXCLUDE_FLOWGRAPH
#define _XTP_EXCLUDE_GRAPHICLIBRARY
#define _XTP_EXCLUDE_PROPERTYGRID
#define _XTP_EXCLUDE_REPORTCONTROL
#define _XTP_EXCLUDE_CALENDAR
#define _XTP_EXCLUDE_TASKPANEL
#define _XTP_EXCLUDE_SHORTCUTBAR
#define _XTP_EXCLUDE_SKINFRAMEWORK
//#define _XTP_EXCLUDE_RIBBON
#define _XTP_EXCLUDE_SYNTAXEDIT
#define _XTP_EXCLUDE_MARKUP
#include <XTToolkitPro.h>
//======== Codejock 17.3===========
if we comment out this line #include "Common/XTPCustomHeap.h" then it goes and we have any Pporblem to compile the project.
ToolkitPro v17.3.0SourceCommonIncludes.h

Best Regards




Posted By: Paulis23
Date Posted: 05 April 2017 at 7:46am
Hello, I could reproduce the problem in the demo projects, I take the project Controls_VC120 and in the file C:\Program files (x86) \Codejock Software2017\MFC\Xtreme ToolkitPro v17.3.0\Samples\Controls\Controls\StdAfx.h i add my settings like the following:


#ifdef DEBUG
#define new DEBUG_NEW
#endif

#define _XTP_REQUIRE_MARKUP
#define _XTP_REQUIRE_CONTROLS
#define _XTP_REQUIRE_COMMANDBARS
#define _XTP_REQUIRE_DOCKINGPANE
#define _XTP_REQUIRE_RIBBON
#include <exclude.h>
#include <xttoolkitpro.h>

Then they get the error message
if they, however, the lines after
#define _XTP_REQUIRE_MARKUP
#define _XTP_REQUIRE_CONTROLS
#define _XTP_REQUIRE_COMMANDBARS
#define _XTP_REQUIRE_DOCKINGPANE
#define _XTP_REQUIRE_RIBBON
#include <exclude.h>
#include <xttoolkitpro.h>
#ifdef DEBUG
#define new DEBUG_NEW
#endif

then programme runs through and you don't have any errors

Regards
 


Posted By: olebed
Date Posted: 05 April 2017 at 7:51pm
Macros DEBUG_NEW breaks overloading of operator 'new' in declaration of classes.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net