CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2010

    boost is not a namespace

    #include <boost/property_tree/ptree.hpp>
    #include <boost/property_tree/xml_parser.hpp>
    // Create an empty property tree object
    using boost::property_tree::ptree;
    #include "kwxport.h"
    #include "resource.h"
    #ifndef __TCONVERT_H__
    #define __TCONVERT_H__
    #ifndef _INC_TCHAR
    # include <tchar.h>
    #ifndef _INC_CRTDBG
    # include <crtdbg.h>
    #ifndef _WINDOWS_
    # include <windows.h>
    #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"

    #include <set>
    class IGameExporter : public SceneExport, public Settings {
    		std::vector<IGameNode *> animated_;
    			IGameScene * igame_;
    			Interface * core_;
    			std::wstring name_;
    		std::map<std::wstring, std::wstring> textureCopy_;
    			char exportTime_[100];
    			TimeValue coreFrame_;
            int                ExtCount();                    // Number of extensions supported
            const MCHAR *    Ext(int n);                    // Extension #n (i.e. "3DS")
            const MCHAR *    LongDesc();                    // Long ASCII description (i.e. "Autodesk 3D Studio File")
            const MCHAR *    ShortDesc();                // Short ASCII description (i.e. "3D Studio")
            const MCHAR *    AuthorName();                // ASCII Author name
            const MCHAR *    CopyrightMessage();            // ASCII Copyright message
            const MCHAR *    OtherMessage1();            // Other message #1
            const MCHAR *    OtherMessage2();            // Other message #2
            unsigned int    Version();                    // Version number * 100 (i.e. v3.01 = 301)
            void            ShowAbout(HWND hWnd);        // Show DLL's "About..." box
            BOOL SupportsOptions(int ext, DWORD options);
            int    DoExport(const MCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE, DWORD options=0);
    		void WriteXFile(IGameScene * ig, MCHAR const * name);
    		template<typename T> void ExportNode(IGameScene * ig, IGameNode * node, T * root, bool selected);
    		void WriteGeometry(IGameScene * ig, IGameNode * node, IGameObject * obj, ID3DXFileSaveData * frame);
    		void WriteGeometry2(IGameScene * ig, IGameNode * node, IGameObject * obj, ID3DXFileSaveData * frame);
    		static DWORD VertexAdd(std::vector<FatVert> & vec, std::vector<std::pair<float, DWORD> > & acc, FatVert const & fv);
    		void ExportAnimations(ID3DXFileSaveObject * save);
    		void ExportFileData(ID3DXFileSaveObject * save);
    	boost::property_tree::ptree mSimData;
    How can I make boost:roperty_tree:tree get recognized by the compiler?

  2. #2
    Join Date
    Apr 1999

    Re: boost is not a namespace

    Quote Originally Posted by lucky6969b View Post
    How can I make boost:roperty_tree:tree get recognized by the compiler?
    I don' know how that code you posted helps in answering your question.

    Given that, the answer is no different than any other type. You include the definitions of the type before you start using it.


    Paul McKenzie

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012

    Re: boost is not a namespace

    A couple of points about your exportmain.cpp.
    #ifndef _INC_TCHAR
    # include <tchar.h>
    #ifndef _INC_CRTDBG
    # include <crtdbg.h>
    #ifndef _WINDOWS_
    # include <windows.h>
    tchar.h already has the test for _INC_TCHAR, crtdbg.h already has the test for _INC_CRTDBG and windows.h already has the test for _WINDOWS_ so these don't need to be also tested here. You are also including crtdbg.h twice.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.7.4)

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.