You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Yaroslav Nalivayko (JIRA)" <ji...@apache.org> on 2017/07/03 08:47:00 UTC

[jira] [Updated] (THRIFT-4242) Can't compile thrift 0.10.0 C++ application (but works with 0.9.2)

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

Yaroslav Nalivayko updated THRIFT-4242:
---------------------------------------
    Description: 
I'm trying to create an application uses thrift.me
I open the lib/cpp/thrift.sln, add include folders and librarys (for boost, openssl and libevent) to the project's properties. 
I can compile thrift.lib and thriftnb.lib without problems.
Then i use thrift compiler to handle the .thrift files from c++ example.

After adding generated files (except skeletons) and libraries to an empty visual studio console application,  i try to compile it.

Then behavior differs for Versions 0.9.2 and 0.10.0

Thrift 0.9.2
Everything is fine. I can implement server and client, and start conversation between them.
That works with TServerSocket <-> TSocket and TPipeServer <-> TPipe.

Thrift 0.10.0
I get many linking errors to OpenSSL, like
libthrift.lib(TSSLSocket.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_OPENSSL_init_ssl" in Funktion ""void __cdecl  Apache::thrift::transport::initializeOpenSSL(void)" (?initializeOpenSSL@transport@thrift@apache@@YAXXZ)".

What can i do to fix this problem?

Update. 
I was developing a thrift 0.9.2 program.
When i use "TFileTransport", for example:   TFileTransport file(filename);
The same linking error occurs.

  was:
I'm trying to create an application uses thrift.me
I open the lib/cpp/thrift.sln, add include folders and librarys (for boost, openssl and libevent) to the project's properties. 
I can compile thrift.lib and thriftnb.lib without problems.
Then i use thrift compiler to handle the .thrift files from c++ example.

After adding generated files (except skeletons) and libraries to an empty visual studio console application,  i try to compile it.

Then behavior differs for Versions 0.9.2 and 0.10.0

Thrift 0.9.2
Everything is fine. I can implement server and client, and start conversation between them.

Thrift 0.10.0
I get many linking errors to OpenSSL, like
libthrift.lib(TSSLSocket.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_OPENSSL_init_ssl" in Funktion ""void __cdecl  Apache::thrift::transport::initializeOpenSSL(void)" (?initializeOpenSSL@transport@thrift@apache@@YAXXZ)".

What can i do to fix this problem?

Update. 
I was developing a thrift 0.9.2 program.
When i use "TFileTransport", for example:   TFileTransport file(filename);
The same linking error occurs.


> Can't compile thrift 0.10.0 C++ application (but works with 0.9.2)
> ------------------------------------------------------------------
>
>                 Key: THRIFT-4242
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4242
>             Project: Thrift
>          Issue Type: IT Help
>          Components: C++ - Library
>    Affects Versions: 0.10.0
>         Environment: Windows 7, 64 bit
> Microsoft Visual Studio 2010, 64 bit
> Boost 1.64.0
> libevent 2.1.8
> OpenSSL 1.1
>            Reporter: Yaroslav Nalivayko
>            Priority: Minor
>              Labels: beginner, build, newbie, starter, windows
>             Fix For: 0.9.2
>
>
> I'm trying to create an application uses thrift.me
> I open the lib/cpp/thrift.sln, add include folders and librarys (for boost, openssl and libevent) to the project's properties. 
> I can compile thrift.lib and thriftnb.lib without problems.
> Then i use thrift compiler to handle the .thrift files from c++ example.
> After adding generated files (except skeletons) and libraries to an empty visual studio console application,  i try to compile it.
> Then behavior differs for Versions 0.9.2 and 0.10.0
> Thrift 0.9.2
> Everything is fine. I can implement server and client, and start conversation between them.
> That works with TServerSocket <-> TSocket and TPipeServer <-> TPipe.
> Thrift 0.10.0
> I get many linking errors to OpenSSL, like
> libthrift.lib(TSSLSocket.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_OPENSSL_init_ssl" in Funktion ""void __cdecl  Apache::thrift::transport::initializeOpenSSL(void)" (?initializeOpenSSL@transport@thrift@apache@@YAXXZ)".
> What can i do to fix this problem?
> Update. 
> I was developing a thrift 0.9.2 program.
> When i use "TFileTransport", for example:   TFileTransport file(filename);
> The same linking error occurs.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)