Search code examples
cygwin

cygwin - additional command to extract protobuf (or other libraries)


I "installed" libprotobuf from Cygwin using the GUI.

However, that step merely downloads a .tar.gz with the actual libraries.

Is there a proper command or location to which to extract it so it's picked up during compilation of software using it?
It downloads the .tar.gz to C:\cygwin64\usr\src\protobuf-3.17.3-1.src

This is what is present in the Cygwin directory

$ find . -name "*protobuf*"
./bin/cygprotobuf-28.dll
./bin/cygprotobuf-lite-28.dll
./etc/setup/libprotobuf28.lst.gz
./usr/src/protobuf-3.17.3-1.src
./usr/src/protobuf-3.17.3-1.src/protobuf-3.17.3-1.cygport
./usr/src/protobuf-3.17.3-1.src/protobuf-3.17.3.tar.gz

Solution

  • You need to install with Cygwin Setup the development package libprotobuf-devel that includes the header and the importlib

    additional info
    https://cygwin.com/packages/summary/libprotobuf-devel.html

    package content
    https://cygwin.com/packages/x86_64/libprotobuf-devel/libprotobuf-devel-3.17.3-1

    ....
    2021-07-10 12:51           0 usr/include/
    2021-07-10 12:51           0 usr/include/google/
    2021-07-10 12:51           0 usr/include/google/protobuf/
    2021-07-10 12:51        6365 usr/include/google/protobuf/any.h
    2021-07-10 12:51       14209 usr/include/google/protobuf/any.pb.h
    2021-07-10 12:51        5916 usr/include/google/protobuf/any.proto
    2021-07-10 12:51       52035 usr/include/google/protobuf/api.pb.h
    ...
    2021-07-10 12:51     1293570 usr/lib/libprotobuf-lite.dll.a
    2021-07-10 12:51     5033634 usr/lib/libprotobuf.dll.a
    2021-07-10 12:51     2563900 usr/lib/libprotoc.dll.a
    ...