<legend id='ozWnZ'><style id='ozWnZ'><dir id='ozWnZ'><q id='ozWnZ'></q></dir></style></legend>

      1. <small id='ozWnZ'></small><noframes id='ozWnZ'>

        <tfoot id='ozWnZ'></tfoot>
        • <bdo id='ozWnZ'></bdo><ul id='ozWnZ'></ul>
        <i id='ozWnZ'><tr id='ozWnZ'><dt id='ozWnZ'><q id='ozWnZ'><span id='ozWnZ'><b id='ozWnZ'><form id='ozWnZ'><ins id='ozWnZ'></ins><ul id='ozWnZ'></ul><sub id='ozWnZ'></sub></form><legend id='ozWnZ'></legend><bdo id='ozWnZ'><pre id='ozWnZ'><center id='ozWnZ'></center></pre></bdo></b><th id='ozWnZ'></th></span></q></dt></tr></i><div id='ozWnZ'><tfoot id='ozWnZ'></tfoot><dl id='ozWnZ'><fieldset id='ozWnZ'></fieldset></dl></div>

        PCH 警告:标题停止不能在宏或 #if 块中 - Visual C+

        时间:2023-10-05

        • <i id='7RCMZ'><tr id='7RCMZ'><dt id='7RCMZ'><q id='7RCMZ'><span id='7RCMZ'><b id='7RCMZ'><form id='7RCMZ'><ins id='7RCMZ'></ins><ul id='7RCMZ'></ul><sub id='7RCMZ'></sub></form><legend id='7RCMZ'></legend><bdo id='7RCMZ'><pre id='7RCMZ'><center id='7RCMZ'></center></pre></bdo></b><th id='7RCMZ'></th></span></q></dt></tr></i><div id='7RCMZ'><tfoot id='7RCMZ'></tfoot><dl id='7RCMZ'><fieldset id='7RCMZ'></fieldset></dl></div>

              <tbody id='7RCMZ'></tbody>
                <bdo id='7RCMZ'></bdo><ul id='7RCMZ'></ul>
                  <tfoot id='7RCMZ'></tfoot>
                1. <legend id='7RCMZ'><style id='7RCMZ'><dir id='7RCMZ'><q id='7RCMZ'></q></dir></style></legend>

                  <small id='7RCMZ'></small><noframes id='7RCMZ'>

                  本文介绍了PCH 警告:标题停止不能在宏或 #if 块中 - Visual C++ 2010 Express SP1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  这是从一个网站粘贴过来的,该网站可能正在运行.我做了一些谷歌搜索,发现我现在遇到的问题是我今天下载的 Visual C++ 2010 SP1 的结果,现在给了我这个错误:

                  This is pasted from a website, which presumably was working. I did some googling and found that the issue I have now is a result of Visual C++ 2010 SP1, which I downloaded today, and is now giving me this error:

                  PCH 警告:标题停止不能在宏或 #if 块中.

                  希望有人能帮我解决这个问题!

                  Hopefully someone will be able to help me with this!

                  #ifndef APP_STATE_H
                  #define APP_STATE_H
                  
                  #include "Framework.h"
                  
                  class AppState; //this line is giving me the error
                  
                  //define two classes
                  
                  #endif
                  

                  Framework.h:

                  Framework.h:

                  #ifndef OGRE_FRAMEWORK_H
                  #define OGRE_FRAMEWORK_H
                  
                  #include <OgreCamera.h>
                  #include <OgreEntity.h>
                  #include <OgreLogManager.h>
                  #include <OgreOverlay.h>
                  #include <OgreOverlayElement.h>
                  #include <OgreOverlayManager.h>
                  #include <OgreRoot.h>
                  #include <OgreViewport.h>
                  #include <OgreSceneManager.h>
                  #include <OgreRenderWindow.h>
                  #include <OgreConfigFile.h>
                  
                  #include <OISEvents.h>
                  #include <OISInputManager.h>
                  #include <OISKeyboard.h>
                  #include <OISMouse.h>
                  
                  class OgreFramework : public Ogre::Singleton<OgreFramework>,OIS::KeyListener,OIS::MouseListener{
                  public:
                      OgreFramework();
                      ~OgreFramework();
                  
                      bool initOgre(Ogre::String wndTitle, OIS::KeyListener *pKeyListener = 0, OIS::MouseListener *pMouseListener = 0);
                      void updateOgre(double timeSinceLastFrame);
                  
                      //OIS
                      bool keyPressed(const OIS::KeyEvent &keyEventRef);
                      bool keyReleased(const OIS::KeyEvent &keyEventRef);
                      bool mouseMoved(const OIS::MouseEvent &evt);
                      bool mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
                      bool mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
                  
                      Ogre::Root* mRoot;
                      Ogre::RenderWindow* mRenderWnd;
                      Ogre::Viewport* mViewport;
                      Ogre::Log* mLog;
                      Ogre::Timer* mTimer;
                  
                      //OIS
                      OIS::InputManager* mInputMgr;
                      OIS::Keyboard* mKeyboard;
                      OIS::Mouse* mMouse;
                  private:
                      OgreFramework(const OgreFramework&);
                      OgreFramework& operator= (const OgreFramework&);
                  };
                  
                  #endif
                  

                  推荐答案

                  我遇到了同样的问题,正在寻找解决方案.以下对我有用:

                  I had the same issue and was looking for a solution. Following worked for me:

                  在文件开头添加#pragma once(甚至在#ifndef APP_STATE_H 头保护之前)

                  Add #pragma once at the start of the file (even before the #ifndef APP_STATE_H header guard)

                  这篇关于PCH 警告:标题停止不能在宏或 #if 块中 - Visual C++ 2010 Express SP1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:链接器生成的 .map 文件有什么用? 下一篇:BOOL 和 bool 有什么区别?

                  相关文章

                  最新文章

                2. <small id='MAnVG'></small><noframes id='MAnVG'>

                  <i id='MAnVG'><tr id='MAnVG'><dt id='MAnVG'><q id='MAnVG'><span id='MAnVG'><b id='MAnVG'><form id='MAnVG'><ins id='MAnVG'></ins><ul id='MAnVG'></ul><sub id='MAnVG'></sub></form><legend id='MAnVG'></legend><bdo id='MAnVG'><pre id='MAnVG'><center id='MAnVG'></center></pre></bdo></b><th id='MAnVG'></th></span></q></dt></tr></i><div id='MAnVG'><tfoot id='MAnVG'></tfoot><dl id='MAnVG'><fieldset id='MAnVG'></fieldset></dl></div>
                    <bdo id='MAnVG'></bdo><ul id='MAnVG'></ul>
                  <tfoot id='MAnVG'></tfoot>

                    <legend id='MAnVG'><style id='MAnVG'><dir id='MAnVG'><q id='MAnVG'></q></dir></style></legend>