I'm trying to install protobuf using Cygwin. I ran ./autogen.sh, no problems. I ran ./configure, no problems. Then I ran make. It runs fine until it gets to command_line_interface.cc, at which point I get:
google/protobuf/compiler/command_line_interface.cc: In function ‘bool google::protobuf::compiler::{anonymous}::GetProtocAbsolutePath(std::string*)’:
google/protobuf/compiler/command_line_interface.cc:220:56: error: ‘readlink’ was not declared in this scope
int len = readlink("/proc/self/exe", buffer, PATH_MAX);
As far as I can tell, I have all the tools I need and I followed the instructions to the letter. Please help.
Try to configure with CXXFLAGS=-std=gnu++11.
Confirmed this does fix the aforementioned issue:
./configure CXXFLAGS=-std=gnu++11
I got the same issue, fixed, thx
I just stumbled into this. Is this really solved? Should configure not be able to figure this out by default?
Fixed it for me. Tanks.
Fixed it for me. Tanks.
How to solve the above problems, can you tell me the specific operation?
Most helpful comment
I just stumbled into this. Is this really solved? Should configure not be able to figure this out by default?