[grpc-io] Re: error: undefined reference to `grpc::ServerBuilder::AddListeningPort(std::string const&, std::shared

2017-09-21 Thread zsf657135507
I have met the same error as you, and I compile the program with GCC 5.4.0. 
Which complier should I use?

在 2017年8月8日星期二 UTC+8下午4:36:19,Thomas Schober写道:
>
> I found the problem by myself now. By some crazy mistake my IDE used a 
> different compiler than i used for compiling grpc. So this was the actual 
> problem. After i switched to the correct compiler it worked.
>
> Am Freitag, 4. August 2017 10:16:40 UTC+2 schrieb Thomas Schober:
>>
>> Hi,
>>
>> i compiled grpc according to the documentation by using MSYS2. I can 
>> compile the helloworld example without problems. No i wrote the following 
>> example :
>>
>> #include  
>>
>> #include "../protobuff/demo.pb.h"
>>
>> #include "MathToolsImpl.h"
>>
>> #include "grpc++/grpc++.h"
>>
>>
>> using namespace std;
>>
>>
>> int main()
>>
>> {
>>
>> std::string server_address("127.0.0.1:50051");
>>
>> MathToolsImpl impl;
>>
>> grpc::ServerBuilder builder;
>>
>> 
>> builder.AddListeningPort(server_address,grpc::InsecureServerCredentials());
>>
>> builder.RegisterService(&impl);
>>
>> unique_ptr server(builder.BuildAndStart());
>>
>> std::cout << "Server started and listening";
>>
>> server->Wait();
>>
>> }
>>
>>
>> When i comment out the line for AddListeningPort the program is linking 
>> fine. Any Idea what i am doing wrong ?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/a1a46f38-ee17-424b-af70-c8755d8028af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: error: undefined reference to `grpc::ServerBuilder::AddListeningPort(std::string const&, std::shared

2017-08-08 Thread Thomas Schober
I found the problem by myself now. By some crazy mistake my IDE used a 
different compiler than i used for compiling grpc. So this was the actual 
problem. After i switched to the correct compiler it worked.

Am Freitag, 4. August 2017 10:16:40 UTC+2 schrieb Thomas Schober:
>
> Hi,
>
> i compiled grpc according to the documentation by using MSYS2. I can 
> compile the helloworld example without problems. No i wrote the following 
> example :
>
> #include  
>
> #include "../protobuff/demo.pb.h"
>
> #include "MathToolsImpl.h"
>
> #include "grpc++/grpc++.h"
>
>
> using namespace std;
>
>
> int main()
>
> {
>
> std::string server_address("127.0.0.1:50051");
>
> MathToolsImpl impl;
>
> grpc::ServerBuilder builder;
>
> 
> builder.AddListeningPort(server_address,grpc::InsecureServerCredentials());
>
> builder.RegisterService(&impl);
>
> unique_ptr server(builder.BuildAndStart());
>
> std::cout << "Server started and listening";
>
> server->Wait();
>
> }
>
>
> When i comment out the line for AddListeningPort the program is linking 
> fine. Any Idea what i am doing wrong ?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/4c6932f7-bde7-46fa-be40-0019fdd4bed5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.