Thanks for the question! Unfortunately cross-compiling protobuf from source can be pretty difficult (particularly for iOS). Is there a reason you want to build from source instead of just using our pre-built protoc binaries provided in our releases page <https://github.com/protocolbuffers/protobuf/releases/tag/v30.1>?
Deanna On Thursday, March 20, 2025 at 12:18:56 AM UTC-7 [email protected] wrote: > I have been researching everywhere how to get a simple Qt/C++ project to > use protobuf on macOS AND iOS. I need to use protobuf runtime for my app to > work, not merely generate C++ headers/source. > > For MacOS, I was able to simply download, build, and install grpc and then > make my `CMAKE_PREFIX_PATH` point there. This worked as expected. > > Of course I got some "wrong architecture" errors when I built for iOS. I > still don't quite know how to make this work for iOS. > > I have looked through multiple resources, but they seem outdated: > - https://gist.github.com/BennettSmith/7150245 > - https://github.com/sinofool/build-protobuf-ios > - > https://stackoverflow.com/questions/19444376/compile-protobuf-with-xcode-5 > > I am a beginner in the Xcode/Apple as well as C++ in general. So perhaps I > am missing some obvious method here. > - Should I be using Xcode to build protobuf from source? > - Should I be cross compiling with some specific cmake instructions, > slightly modifying the instructions here > <https://github.com/protocolbuffers/protobuf/blob/main/cmake/README.md> > in some manner? > > Thanks for the help! > > Best, > Arjun > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/protobuf/e5911ca2-9712-45c5-9e9e-1e578ebd6ae5n%40googlegroups.com.
