[boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: [boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..

  1. #1
    Join Date
    Dec 2010
    Posts
    524

    [boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..

    Code:
    #include "kwxport.h"
    
    #include "resource.h"
    
    #ifndef __TCONVERT_H__
    #define __TCONVERT_H__
    #endif
    #ifndef _INC_TCHAR
    # include <tchar.h>
    #endif
    #ifndef _INC_CRTDBG
    # include <crtdbg.h>
    #endif
    #ifndef _WINDOWS_
    # include <windows.h>
    #endif
    
    #include <d3dx9xof.h>
    #include "rmxftmpl.h"
    #include "rmxfguid.h"
    #include <d3dx9mesh.h>
    
    #include <dbghelp.h>
    #include <plugapi.h>
    #include <hold.h>
    #include <quat.h>
    #include <IDxMaterial.h>
    #include <IPathConfigMgr.h>
    #include <crtdbg.h>
    #include <maxapi.h>
    #include <interval.h>
    
    #include <set>
    #include <algorithm>
    #include <sstream>
    
    //#include "kwlog.h"
    #include "exportmain.h"
    
    
    #define USE_FILE_RESOLUTION 0
    #define IGAME_BUG 0
    #if defined(MAX_RELEASE)
    #if defined(MAX_RELEASE_R12_ALPHA) && MAX_RELEASE >= MAX_RELEASE_R12_ALPHA
    #undef USE_FILE_RESOLUTION
    #define USE_FILE_RESOLUTION 1
    #include <AssetManagement/AssetUser.h>
    #include <IFileResolutionManager.h>
    #pragma comment(lib, "assetmanagement.lib")
    #if defined(_M_X64)
    #undef IGAME_BUG
    #if !defined(MAX_RELEASE_R13) || MAX_RELEASE < MAX_RELEASE_R13
    #define IGAME_BUG 1
    #else
    #define IGAME_BUG 0
    #endif
    #endif
    #endif
    #else
    #error "MAX_RELEASE must be defined!"
    #endif
    
    //TODO: for 1.5, support sorting transparent material triangles and splitting 2-sided triangles
    //TODO: for 1.5, convert textures to DDS when "rename to dds" and "copy textures" are on
    //TODO: for 1.5, convert the settings interface to use real ParamBlk2, and expose a Utility 
    //        that allows editing it.
    
    //BUG:  There appears to be a pivot center offset problem
    //FIXED:  There appears to be some problem with non-contiguous texture map channels
    
    #if 0 //  todo: remember to set to 0 before ship!
    #define OPTIMIZED 0
    #else
    #define OPTIMIZED 1
    #endif
    
    #if !OPTIMIZED
    #pragma optimize("", off)
    #endif
    
    #include <boost/property_tree/ptree.hpp>
    #include <boost/property_tree/xml_parser.hpp>
    
    // Create an empty property tree object
    using boost::property_tree::ptree;
    ptree exportedData;
    
    
    #pragma comment(lib, "bmm.lib")
    //#pragma warning(disable: 4312) // cast int/pointer
    
    #define MAX_UV_SETS 4
    Code:
    Warning	1	warning C4003: not enough actual parameters for macro 'base_type'	E:\Programming\Libraries\boost_1_54_0\boost\serialization\collection_size_type.hpp	41	1	kwxport
    Error	2	error C2544: expected ')' for operator '()'	E:\Programming\Libraries\boost_1_54_0\boost\serialization\collection_size_type.hpp	41	1	kwxport
    Error	3	error C2059: syntax error : '('	E:\Programming\Libraries\boost_1_54_0\boost\serialization\collection_size_type.hpp	41	1	kwxport
    Error	4	error C2091: function returns function	E:\Programming\Libraries\boost_1_54_0\boost\serialization\collection_size_type.hpp	41	1	kwxport
    Error	5	error C2143: syntax error : missing ',' before '&'	E:\Programming\Libraries\boost_1_54_0\boost\serialization\collection_size_type.hpp	41	1	kwxport
    Error	6	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	E:\Programming\Libraries\boost_1_54_0\boost\serialization\collection_size_type.hpp	41	1	kwxport
    Error	7	error C2059: syntax error : '('	E:\Programming\Libraries\boost_1_54_0\boost\serialization\collection_size_type.hpp	41	1	kwxport
    Any help would be greatly appreciated!

    I know the answer of my problem, I find maxsdk and boost's method name base_type() clash
    Both have it.
    How can I resolve it?


    Thanks in advance
    Jack
    Last edited by lucky6969b; November 7th, 2013 at 02:20 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,003

    Re: [boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..

    Quote Originally Posted by lucky6969b View Post
    I know the answer of my problem, I find maxsdk and boost's method name base_type() clash
    Both have it.
    How can I resolve it?
    Do you mean the maxsdk has a macro named base_type? That's just plain evil. You should definitely ask them to change this.
    As a work-around, can you make sure that the boost headers are always included before the maxsdk ones?
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  3. #3
    Join Date
    Dec 2010
    Posts
    524

    Re: [boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..

    Hello,
    Okay, I follow your instruction, by putting the boost header first,
    It works, but it is just too evil, like you said.

    Thanks
    Jack
    Last edited by lucky6969b; November 7th, 2013 at 03:57 AM.

  4. #4
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,652

    Re: [boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..

    namespaces, namespaces, namespaces...

  5. #5
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,003

    Re: [boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..

    Quote Originally Posted by OReubens View Post
    namespaces, namespaces, namespaces...
    They don't help one bit when it is the name of a macro that clashes.
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  6. #6
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,652

    Re: [boost] When including <boost/property_tree/ptree.hpp>, I receive these errors..

    that makes it even worse...
    it's bad enough a lib defines macro's.
    it's worse when it does so without regard for 'usual convention' (macro names being uppercase) and doesn't even try to make the macro names specific enough to avoid conflict.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center