2013-10-23 4 views
0

CCXML 실행을 테스트하기 위해 Oktopous CCXML을 실행하려고합니다. Oktopous 사이트에서 다운로드 한 liboktopous 32 비트 라이브러리가 있습니다. liboktopous.so라이브러리의 함수에 대한 정의되지 않은 참조

liboktopous.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped 

나노 미터의 출력 -D liboktopous.so에 대한 파일 정보는 here입니다. 내가

g++ -m32 -I/home/test/ccxml.back/oktopous/include -L/home/test/ccxml.back/oktopous/lib/liboktopous.so ../wrapper/test.cpp 

가 내가 뭐하는 거지 무슨 일

/tmp/ccsJNUJi.o: In function `main': 
test.cpp:(.text+0x21): undefined reference to `OktoInterpreter::Initialize(OktoLog*, OutputQueue**, OktoInterpreter::EventThreadPolicy)' 
test.cpp:(.text+0x2d): undefined reference to `OktoInterpreter::Deinitialize(OutputQueue*)' 
collect2: ld returned 1 exit status 

을 얻을 사용

#include "/home/test/ccxml.back/oktopous/include/OktoInterpreter.hpp" 

int main() 
{ 
     OutputQueue *outQ; 
     OktoInterpreter::Initialize(NULL,&outQ,OktoInterpreter::POLICY_DEFAULT); 
     OktoInterpreter::Deinitialize(outQ); 
} 

를 컴파일 할 때 포함 파일은 이제

#ifndef _OKTOINTERPRETER_H_ 
#define _OKTOINTERPRETER_H_ 

#include <OktoDefs.hpp> 
#include <string> 


typedef std::basic_string<VXIchar> vxistring ; 

class OktoLog; 
class OktoPlatform; 
class OktoInet; 
class OutputQueue; 
class OktoScript; 


/** 
* Interface for interacting with the CCXML interpreter. 
* 
* \ingroup Platform 
*/ 
class OKTO_API OktoInterpreter 
{ 
    public: 
     /** OktoInterpreter Result */ 

     enum Result { 
      /** Fatal error, terminate call */ 
      RESULT_FATAL_ERROR   = -100, 
      /** Out of memory     */ 
      RESULT_OUT_OF_MEMORY  = -6, 
      /** System error, out of service */ 
      RESULT_SYSTEM_ERROR   = -5, 
      /** Property name is not valid  */ 
      RESULT_INVALID_PROP_NAME = -3, 
      /** Property value is not valid */ 
      RESULT_INVALID_PROP_VALUE = -2, 
      /** Invalid function argument  */ 
      RESULT_INVALID_ARGUMENT  = -1, 
      /** Success      */ 
      RESULT_SUCCESS    = 0, 
      /** Normal failure, nothing logged */ 
      RESULT_FAILURE    = 1, 
      /** Non-fatal non-specific error */ 
      RESULT_NON_FATAL_ERROR  = 2, 
      /** Document not found    */ 
      RESULT_NOT_FOUND   = 50, 
      /** Other document fetch error  */ 
      RESULT_FETCH_ERROR   = 52, 
      /** Not a valid CCXML document  */ 
      RESULT_INVALID_DOCUMENT  = 53, 
      /** Uncaught fatal VoiceXML event */ 
      RESULT_UNCAUGHT_FATAL_EVENT = 55, 
      /** ECMAScript syntax error  */ 
      RESULT_SCRIPT_ERROR   = 56, 
      /** Not runnning     */ 
      RESULT_NOT_RUNNING   = 57, 
      /** Operation is not supported  */ 
      RESULT_UNSUPPORTED   = 100 
     }; 

     enum EventThreadPolicy { 
      POLICY_DEFAULT, 
      POLICY_POOLED 
     }; 
     /** 
     * Resources used by the interpreter when run. 
     * \ingroup Platform 
     */ 
     struct Resources { 
      /** log interface */ 
      OktoLog    * log; 
      /** ECMAScript interface */ 
      OktoScript   * jsi;  
      /** Internet interface */ 
      OktoInet    * inet; 
      /** Platform interface */ 
      OktoPlatform   * platform; 
     }; 

    public: 
     /** 
     * One time initializtion of the interpreter.<p> 
     * This function should be called once at platform startup.<p> 
     * 
     * @param log   Pointer to a log object. This method does not retain 
     *     this object, rather uses it for the length of the 
     *     method call. 
     * @param diagLogBase Base dialog ID. 
     * @param output  [OUT] A pointer the to the output queue the platform 
     *     will receives commands from. The platform should 
     *     create at least one thread to processes commands on. 
     * 
     * @return true if initialization is successful. 
     */ 
     //static bool Initialize(OktoLog * log, VXIunsigned diagLogBase, OutputQueue **output, EventThreadPolicy policy); 
     static bool Initialize(OktoLog * log,OutputQueue **output, EventThreadPolicy policy); 

     /** 
     * One time shutdown of the interpreter. 
     * 
     * @param log   Pointer to a log object. This method does not retain 
     *     this object, rather uses it for the length of the 
     *     method call. 
     * @param output  Pointer to the outout queue received from the call 
     *     to Initialize. 
     */ 
     static void Deinitialize(OutputQueue *output); 

     /** 
     * Creates an instance of an interpreter. 
     */ 
     static OktoInterpreter *CreateInstance(); 


     /** 
     * Destroys an instance of an interpreter. 
     */ 
     static void DestroyInstance(OktoInterpreter *interp); 

     /** 
     * Starts CCXML interpretation of the specified script. 
     * 
     * @param initialURI [IN] The URI of the starting CCXML doc. 
     * @param args   [IN] Option properties that affect interpreter 
     *       behavior: None now. 
     * @param resources [IN] Resources supplied by the platform. 
     * 
     * @return: RESULT_FATAL_ERROR<br> 
     *   RESULT_OUT_OF_MEMORY<br> 
     *   RESULT_SUCCESS<br> 
     *   RESULT_INVALID_ARGUMENT<br> 
     *   RESULT_INVALID_DOCUMENT<br> 
     */ 
     virtual Result Run(
       const VXIchar * initialURI, 
       const VXIchar * csessionid, 
       const VXIchar * fetchid, 
         const VXIMap * fetchProperties, //Added this to send fetch props to fetcher 
       const VXIMap * args, 
       Resources  * resources) = 0; 

     /** 
     * Add an event to the event queue. 
     * 
     * @param event [IN] The event to post. If successful, the 
     *     interpreter owns the VXIMap, otherwise 
     *     the caller is responsible for destroying 
     *     it. 
     * @param delay [IN] The delay, in milliseconds before the 
     *     event is processed. 
     * 
     * @return RESULT_SUCCESS<br> 
     *   RESULT_NOT_RUNNING<br> 
     *   RESULT_INVALID_ARGUMENT<br> 
     */ 
     virtual Result PostEvent(VXIMap *event, VXIunsigned delay) = 0; 

     virtual bool CancelEvent(vxistring& sendid) =0; 
     //saurabh 2011 added for fetch testing,remove it if you still have it 
     virtual OktoInet* returnInetResource()=0; 
}; 

#endif 

입니까?

+0

임의의 주석 : include에 대한 전체 경로를 쓸 필요는 없습니다 ('#include "/home/test/ccxml.back/oktopous/include/OktoInterpreter.hpp"'라고 씁니다). GCC에'-I/home/test/ccxml.back/oktopous/include'를 넘겨주기 때문에'#include "OktoInterpreter.hpp"'를 쓸 수 있습니다. GCC는 include 파일의 위치를 ​​알려줍니다 – thelamb

답변

0

나는 이것을 처리했다. -m32 플래그를 사용하면 64 비트 시스템에서 32 비트 라이브러리를 사용할 수 있다고 생각했습니다. 그러나 그것은 사실이 아닙니다. 내 코드를 32 비트 컴퓨터로 이식하고 해결했습니다.

관련 문제