c++ - C++11 luabind integration, function failing -


मैं अपने प्रोग्राम में luabind के साथ एलयूए को एकीकृत करने के साथ प्रयोग कर रहा हूं, लेकिन मैंने एक बड़ा रुकावट वाला ब्लॉक।

मैं एलयूए के फोनिंग सम्मेलनों से बहुत अपरिचित हूं और मुझे लगता है कि मुझे कुछ सरल याद आ रही है।

यहां मेरा सी ++ कोड है:

  struct एपीआईटी {// ... शून्य से बाहर निकलें (); शून्य रीसेट (); संसाधन_मग्री_टी संसाधन; // ...}; struct resource_mgr_t {// ... void prune (); शून्य शुद्ध (); // ...}; एक्सटॉन एप_टी ऐप;   

और मेरी luabind मॉड्यूल:

  luabind :: मॉड्यूल (राज्य) [luabind :: class_ & lt; resource_mgr_t & gt; (" Resource_mgr ") .def (" prune ", और resource_mgr_t :: prune) .def (" purge ", और resource_mgr_t :: purge)]; लुईबेंड :: मॉड्यूल (राज्य) [luabind :: class_ & lt; app_t & gt; ("ऐप") .def ("exit", और एपीआईटी :: निकास) .def ("रीसेट", और एपीआईटी :: रीसेट) .def_readonly ("संसाधन", और एपीआईटी :: संसाधन)]; लुबाइंड :: ग्लोबल्स (राज्य) ["ऐप"] = एंड एप;   

मैं निम्नलिखित लवा आज्ञाओं को ठीक कर सकता हूं:

  ऐप: exit () ऐप: रीसेट ()   < p> हालांकि, निम्नलिखित कॉल में विफल रहता है:  
  ऐप। स्रोत: शुद्ध ()   

निम्न त्रुटि के साथ:

 < कोड> [स्ट्रिंग "app.resources: purge ()"]: 1: सूचकांक क्षेत्र 'संसाधनों' (एक फ़ंक्शन मान) करने का प्रयास   

कोई भी मदद बहुत सराहना की जाती है!

और, जैसा कि ऐप में: रीसेट ()

/ div>

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -