SORU
14 Mayıs 2011, CUMARTESİ


PCH Uyarı: başlık durduramaz SP1 Express makro veya * Eğer bir blok - C 2010 Görsel olması

Bu muhtemelen çalışan bir web sitesinden yapıştırılır. Bazı googling yaptım ve şimdi ben sorunu bugün indirdim 2010 SP1, Visual C sonucudur, ve şimdi bana bu hata veriyor buldu

PCH Warning: header stop cannot be in a macro or #if block.

Umarım birileri bu konuda bana yardım etmek mümkün olacak!

#ifndef APP_STATE_H
#define APP_STATE_H

#include "Framework.h"

class AppState; //this line is giving me the error

//define two classes

#endif

Çerçeve.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

CEVAP
7 HAZİRAN 2011, Salı


Ben de aynı sorun vardı ve bir çözüm arıyordu. Benim için çalıştı aşağıdaki:

Dosyanın başında #pragma once (bile #ifndef APP_STATE_H başlık koruma önce) ekleyin

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • bombjack2991

    bombjack2991

    29 HAZİRAN 2008
  • brokenbellsVEVO

    brokenbellsV

    11 EYLÜL 2009
  • GUN-TIME with Brandon

    GUN-TIME wit

    3 ŞUBAT 2009