boost is not a namespace
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: boost is not a namespace

Hybrid View

  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 online now 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. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
    C, C++ Compiler: Microsoft VS2015

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

This a survey!

HTML5 Development Center