how to compile with protocol buffer into .so file

I’m trying to use Google’s Protocol buffer on a C++ project. I can build it just fine for say… an iOS framework target. However, I can’t seem to get the compiler to find any of the google/protobuf files

in the output of the proto file, let’s say blah.pb.h, i have a reference to protobuf:

#include <google/protobuf/stubs/common.h>

the compiler can’t find that ^ reference.

I’ve tried to ndk-build with something like this:

include $(CLEAR_VARS)
LOCAL_MODULE    := libprotobuf
LOCAL_SRC_FILES := src/lib/libprotobuf.a
... main module stuff

but it doesn’t seem to help at all. what’s going on? how do i include lib protobuf when i have the .a file? do i have to compile it from source?

Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.