1

私は C++ を初めて使用します。Windows で twilio ライブラリをコンパイルしようとしています。

コードをビルドしようとすると、次のエラーが発生します

私が行ったことと私が使用しているものの簡単な概要を説明します。

MinGW をインストールしました。すべてのライブラリ ファイルは、その下の適切なインクルード フォルダーにあります。

IDE に sublime を使用していますが、これはビルド時に受け取ったエラーです。

アップデート*

私はmakeを実行しました。Cygwin からの出力をコピーしていますが、通常の DOS プロンプトでも同じ出力が得られました。

$ mingw32-make

ar rcs twilio-cplusplus.a Rest.o TwiML.o Utils.o

make ファイルまたはコードのいずれかをここにコピーできます。

更新終了*

私は単純なものが欠けているに違いないことを知っています。

C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0x313): undefined reference to `twilio::Rest::request(std::string const&, std::string const&, std::vector<twilio::Var, std::allocator<twilio::Var> > const&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0x74a): undefined reference to `twilio::Rest::request(std::string const&, std::string const&, std::vector<twilio::Var, std::allocator<twilio::Var> > const&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xb69): undefined reference to `twilio::Rest::request(std::string const&, std::string const&, std::vector<twilio::Var, std::allocator<twilio::Var> > const&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xc74): undefined reference to `twilio::Say::setLoop(int)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xcae): undefined reference to `twilio::Say::setVoice(std::string const&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xcdc): undefined reference to `twilio::Verb::append(twilio::Verb&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xcf1): undefined reference to `twilio::Verb::toXML()'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xd54): undefined reference to `twilio::Gather::setNumDigits(int)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xdca): undefined reference to `twilio::Verb::append(twilio::Verb&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xde2): undefined reference to `twilio::Verb::append(twilio::Verb&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xdfa): undefined reference to `twilio::Verb::append(twilio::Verb&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xe0f): undefined reference to `twilio::Verb::toXML()'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text+0xfe3): undefined reference to `twilio::Utils::validateRequest(std::string const&, std::string const&, std::vector<twilio::Var, std::allocator<twilio::Var> >&)'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio3SayC1ERKSs[twilio::Say::Say(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x14): undefined reference to `twilio::Verb::V_SAY'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio6GatherC1Ev[twilio::Gather::Gather()]+0x3a): undefined reference to `twilio::Verb::V_GATHER'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio6GatherC1Ev[twilio::Gather::Gather()]+0x66): undefined reference to `twilio::Verb::V_SAY'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio6GatherC1Ev[twilio::Gather::Gather()]+0x7c): undefined reference to `twilio::Verb::V_PLAY'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio6GatherC1Ev[twilio::Gather::Gather()]+0x92): undefined reference to `twilio::Verb::V_PAUSE'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio8RedirectC1Ev[twilio::Redirect::Redirect()]+0x3a): undefined reference to `twilio::Verb::V_REDIRECT'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0x3a): undefined reference to `twilio::Verb::V_RESPONSE'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0x66): undefined reference to `twilio::Verb::V_GATHER'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0x7c): undefined reference to `twilio::Verb::V_RECORD'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0x92): undefined reference to `twilio::Verb::V_DIAL'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()[Finished in 3.9s with exit code 1]]+0xa8): undefined reference to `twilio::Verb::V_SAY'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0xbe): undefined reference to `twilio::Verb::V_PLAY'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0xd4): undefined reference to `twilio::Verb::V_REDIRECT'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0xea): undefined reference to `twilio::Verb::V_REJECT'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0x100): undefined reference to `twilio::Verb::V_HANGUP'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0x116): undefined reference to `twilio::Verb::V_PAUSE'
    C:\Users\user\AppData\Local\Temp\ccInjOWV.o:Examples.cpp:(.text$_ZN6twilio13TwiMLResponseC1Ev[twilio::TwiMLResponse::TwiMLResponse()]+0x12c): undefined reference to `twilio::Verb::V_SMS'
    collect2: ld returned 1 exit status
4

0 に答える 0