how to compile a MFC Project with codejock! |
Post Reply |
Author | |
Paulis23
Groupie Joined: 16 February 2017 Status: Offline Points: 11 |
Post Options
Thanks(0)
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! |
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Hello,
Please describe how you create project, what settings ? Regards, Oleksandr Lebed |
|
Paulis23
Groupie Joined: 16 February 2017 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
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. Best Regards |
|
Paulis23
Groupie Joined: 16 February 2017 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
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 |
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Macros DEBUG_NEW breaks overloading of operator 'new' in declaration of classes.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |