[ 
https://issues.apache.org/jira/browse/THRIFT-3832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir updated THRIFT-3832:
-----------------------------
    Environment: 
OS: Windows 7 x64
Visual Studio: 2013, 2015
Boost: 1.59.0 (i download already compiled binaried)
Libevent: 2.0.22
OpenSSL: 1.0.2h

  was:
OS: Windows 7, Windows 10
Visual Studio: 2013, 2015
Boost: 1.59.0 (i download already compiled binaried)
Libevent: 2.0.22
OpenSSL: 1.0.2h


> Thrift version 0.9.3 example on Windows, Visual Studio, linking errors during 
> compiling
> ---------------------------------------------------------------------------------------
>
>                 Key: THRIFT-3832
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3832
>             Project: Thrift
>          Issue Type: Question
>          Components: C++ - Compiler
>    Affects Versions: 0.9.3
>         Environment: OS: Windows 7 x64
> Visual Studio: 2013, 2015
> Boost: 1.59.0 (i download already compiled binaried)
> Libevent: 2.0.22
> OpenSSL: 1.0.2h
>            Reporter: Vladimir
>            Priority: Blocker
>              Labels: build, newbie, windows
>
> I have working projects of Thrift 0.9.3 Server+Client in C# and Node.JS; and 
> also I have working Calculator example on C++ with 0.9.2 thrift (i used this 
> guide to create it 
> http://mohamednadjibmami.com/apache-thrift-for-c-on-visual-studio-2015/ )
> But when i tried to create Calculator example on C++ with 0.9.3 thrift, i get 
> a lot of linking errors, for example in combination of Visual Studio 2015 + 
> Boost 1.59.0 (x64), libevent 2.0.22, OpenSSL 1.0.2h (x64), thrift 0.9.3 
> (x64), CalculatorClient(x64) i have following errors:
> 1>------ Перестроение всех файлов начато: проект: TestClient, Конфигурация: 
> Debug x64 ------
> 1>  tutorial_types.cpp
> 1>  tutorial_constants.cpp
> 1>  shared_types.cpp
> 1>  shared_constants.cpp
> 1>  SharedService.cpp
> 1>  Calculator.cpp
> 1>  CppClient.cpp
> 1>  Создание кода...
> 1>CppClient.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: virtual __cdecl 
> apache::thrift::protocol::TProtocol::~TProtocol(void)" 
> (??1TProtocol@protocol@thrift@apache@@UEAA@XZ) в функции "public: virtual 
> __cdecl 
> apache::thrift::protocol::TProtocolDefaults::~TProtocolDefaults(void)" 
> (??1TProtocolDefaults@protocol@thrift@apache@@UEAA@XZ)
> 1>CppClient.obj : error LNK2001: неразрешенный внешний символ ""public: 
> virtual unsigned int __cdecl 
> apache::thrift::protocol::TProtocol::skip_virt(enum 
> apache::thrift::protocol::TType)" 
> (?skip_virt@TProtocol@protocol@thrift@apache@@UEAAIW4TType@234@@Z)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: void __cdecl apache::thrift::TOutput::printf(char const *,...)" 
> (?printf@TOutput@thrift@apache@@QEAAXPEBDZZ) в функции "public: virtual bool 
> __cdecl apache::thrift::TDispatchProcessor::process(class 
> boost::shared_ptr<class apache::thrift::protocol::TProtocol>,class 
> boost::shared_ptr<class apache::thrift::protocol::TProtocol>,void *)" 
> (?process@TDispatchProcessor@thrift@apache@@UEAA_NV?$shared_ptr@VTProtocol@protocol@thrift@apache@@@boost@@0PEAX@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> void __cdecl apache::thrift::TOutput::printf(char const *,...)" 
> (?printf@TOutput@thrift@apache@@QEAAXPEBDZZ)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: __cdecl 
> apache::thrift::async::TConcurrentSendSentry::TConcurrentSendSentry(class 
> apache::thrift::async::TConcurrentClientSyncInfo *)" 
> (??0TConcurrentSendSentry@async@thrift@apache@@QEAA@PEAVTConcurrentClientSyncInfo@123@@Z)
>  в функции "public: int __cdecl 
> tutorial::CalculatorConcurrentClient::send_add(int,int)" 
> (?send_add@CalculatorConcurrentClient@tutorial@@QEAAHHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> __cdecl 
> apache::thrift::async::TConcurrentSendSentry::TConcurrentSendSentry(class 
> apache::thrift::async::TConcurrentClientSyncInfo *)" 
> (??0TConcurrentSendSentry@async@thrift@apache@@QEAA@PEAVTConcurrentClientSyncInfo@123@@Z)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: __cdecl 
> apache::thrift::async::TConcurrentSendSentry::~TConcurrentSendSentry(void)" 
> (??1TConcurrentSendSentry@async@thrift@apache@@QEAA@XZ) в функции "public: 
> int __cdecl tutorial::CalculatorConcurrentClient::send_add(int,int)" 
> (?send_add@CalculatorConcurrentClient@tutorial@@QEAAHHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> __cdecl 
> apache::thrift::async::TConcurrentSendSentry::~TConcurrentSendSentry(void)" 
> (??1TConcurrentSendSentry@async@thrift@apache@@QEAA@XZ)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: void __cdecl 
> apache::thrift::async::TConcurrentSendSentry::commit(void)" 
> (?commit@TConcurrentSendSentry@async@thrift@apache@@QEAAXXZ) в функции 
> "public: int __cdecl tutorial::CalculatorConcurrentClient::send_add(int,int)" 
> (?send_add@CalculatorConcurrentClient@tutorial@@QEAAHHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> void __cdecl apache::thrift::async::TConcurrentSendSentry::commit(void)" 
> (?commit@TConcurrentSendSentry@async@thrift@apache@@QEAAXXZ)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: __cdecl 
> apache::thrift::async::TConcurrentRecvSentry::TConcurrentRecvSentry(class 
> apache::thrift::async::TConcurrentClientSyncInfo *,int)" 
> (??0TConcurrentRecvSentry@async@thrift@apache@@QEAA@PEAVTConcurrentClientSyncInfo@123@H@Z)
>  в функции "public: int __cdecl 
> tutorial::CalculatorConcurrentClient::recv_add(int)" 
> (?recv_add@CalculatorConcurrentClient@tutorial@@QEAAHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> __cdecl 
> apache::thrift::async::TConcurrentRecvSentry::TConcurrentRecvSentry(class 
> apache::thrift::async::TConcurrentClientSyncInfo *,int)" 
> (??0TConcurrentRecvSentry@async@thrift@apache@@QEAA@PEAVTConcurrentClientSyncInfo@123@H@Z)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: __cdecl 
> apache::thrift::async::TConcurrentRecvSentry::~TConcurrentRecvSentry(void)" 
> (??1TConcurrentRecvSentry@async@thrift@apache@@QEAA@XZ) в функции "public: 
> int __cdecl tutorial::CalculatorConcurrentClient::recv_add(int)" 
> (?recv_add@CalculatorConcurrentClient@tutorial@@QEAAHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> __cdecl 
> apache::thrift::async::TConcurrentRecvSentry::~TConcurrentRecvSentry(void)" 
> (??1TConcurrentRecvSentry@async@thrift@apache@@QEAA@XZ)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: void __cdecl 
> apache::thrift::async::TConcurrentRecvSentry::commit(void)" 
> (?commit@TConcurrentRecvSentry@async@thrift@apache@@QEAAXXZ) в функции 
> "public: int __cdecl tutorial::CalculatorConcurrentClient::recv_add(int)" 
> (?recv_add@CalculatorConcurrentClient@tutorial@@QEAAHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> void __cdecl apache::thrift::async::TConcurrentRecvSentry::commit(void)" 
> (?commit@TConcurrentRecvSentry@async@thrift@apache@@QEAAXXZ)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: int __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::generateSeqId(void)" 
> (?generateSeqId@TConcurrentClientSyncInfo@async@thrift@apache@@QEAAHXZ) в 
> функции "public: int __cdecl 
> tutorial::CalculatorConcurrentClient::send_add(int,int)" 
> (?send_add@CalculatorConcurrentClient@tutorial@@QEAAHHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> int __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::generateSeqId(void)" 
> (?generateSeqId@TConcurrentClientSyncInfo@async@thrift@apache@@QEAAHXZ)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: bool __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::getPending(class 
> std::basic_string<char,struct std::char_traits<char>,class 
> std::allocator<char> > &,enum apache::thrift::protocol::TMessageType &,int 
> &)" 
> (?getPending@TConcurrentClientSyncInfo@async@thrift@apache@@QEAA_NAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAW4TMessageType@protocol@34@AEAH@Z)
>  в функции "public: int __cdecl 
> tutorial::CalculatorConcurrentClient::recv_add(int)" 
> (?recv_add@CalculatorConcurrentClient@tutorial@@QEAAHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> bool __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::getPending(class 
> std::basic_string<char,struct std::char_traits<char>,class 
> std::allocator<char> > &,enum apache::thrift::protocol::TMessageType &,int 
> &)" 
> (?getPending@TConcurrentClientSyncInfo@async@thrift@apache@@QEAA_NAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAW4TMessageType@protocol@34@AEAH@Z)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: void __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::updatePending(class 
> std::basic_string<char,struct std::char_traits<char>,class 
> std::allocator<char> > const &,enum 
> apache::thrift::protocol::TMessageType,int)" 
> (?updatePending@TConcurrentClientSyncInfo@async@thrift@apache@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4TMessageType@protocol@34@H@Z)
>  в функции "public: int __cdecl 
> tutorial::CalculatorConcurrentClient::recv_add(int)" 
> (?recv_add@CalculatorConcurrentClient@tutorial@@QEAAHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> void __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::updatePending(class 
> std::basic_string<char,struct std::char_traits<char>,class 
> std::allocator<char> > const &,enum 
> apache::thrift::protocol::TMessageType,int)" 
> (?updatePending@TConcurrentClientSyncInfo@async@thrift@apache@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4TMessageType@protocol@34@H@Z)"
> 1>Calculator.obj : error LNK2019: ссылка на неразрешенный внешний символ 
> "public: void __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::waitForWork(int)" 
> (?waitForWork@TConcurrentClientSyncInfo@async@thrift@apache@@QEAAXH@Z) в 
> функции "public: int __cdecl 
> tutorial::CalculatorConcurrentClient::recv_add(int)" 
> (?recv_add@CalculatorConcurrentClient@tutorial@@QEAAHH@Z)
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""public: 
> void __cdecl 
> apache::thrift::async::TConcurrentClientSyncInfo::waitForWork(int)" 
> (?waitForWork@TConcurrentClientSyncInfo@async@thrift@apache@@QEAAXH@Z)"
> 1>Calculator.obj : error LNK2001: неразрешенный внешний символ ""class 
> apache::thrift::TOutput apache::thrift::GlobalOutput" 
> (?GlobalOutput@thrift@apache@@3VTOutput@12@A)"
> 1>SharedService.obj : error LNK2001: неразрешенный внешний символ ""class 
> apache::thrift::TOutput apache::thrift::GlobalOutput" 
> (?GlobalOutput@thrift@apache@@3VTOutput@12@A)"
> 1>libthrift.lib(TSocket.obj) : error LNK2001: неразрешенный внешний символ 
> ""class apache::thrift::TOutput apache::thrift::GlobalOutput" 
> (?GlobalOutput@thrift@apache@@3VTOutput@12@A)"
> 1>libthrift.lib(TSocket.obj) : error LNK2019: ссылка на неразрешенный внешний 
> символ "public: void __cdecl apache::thrift::TOutput::perror(char const 
> *,int)" (?perror@TOutput@thrift@apache@@QEAAXPEBDH@Z) в функции "protected: 
> void __cdecl apache::thrift::transport::TSocket::openConnection(struct 
> addrinfo *)" 
> (?openConnection@TSocket@transport@thrift@apache@@IEAAXPEAUaddrinfo@@@Z)
> 1>libthrift.lib(TSocket.obj) : error LNK2019: ссылка на неразрешенный внешний 
> символ "public: static class std::basic_string<char,struct 
> std::char_traits<char>,class std::allocator<char> > __cdecl 
> apache::thrift::TOutput::strerror_s(int)" 
> (?strerror_s@TOutput@thrift@apache@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
>  в функции "public: __cdecl 
> apache::thrift::transport::TTransportException::TTransportException(enum 
> apache::thrift::transport::TTransportException::TTransportExceptionType,class 
> std::basic_string<char,struct std::char_traits<char>,class 
> std::allocator<char> > const &,int)" 
> (??0TTransportException@transport@thrift@apache@@QEAA@W4TTransportExceptionType@0123@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
> 1>C:\ThriftTest\093\vs2015\093git_boost59\thriftTest\TestClient\TestClient\x64\Debug\TestClient.exe
>  : fatal error LNK1120: неразрешенных внешних элементов: 16
> ========== Перестроение всех проектов: успешно: 0, с ошибками: 1, пропущено: 
> 0 ==========
> P.S.: by the way i noticed, that in 0.9.3 version of thrift there is no 
> source file Thrift.cpp.
> Tell me please, is there anything what i'm doing wrong?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to