multi arch build of protobuf on macosx

10 views
Skip to first unread message

Romain Francois

unread,
Apr 7, 2010, 12:34:21 PM4/7/10
to Protocol Buffers
Hello,

Please bear with me if this is obvious ... I'm new to OSX.

Are there instructions somewhere to build protobuf for both i386 and
x86_64 architectures on OSX.


Also, on linux I can do :

$ pkg-config --libs protobuf
$ pkg-config --cflags protobuf

but OSX does not have pkg-config. I can get it through fink or something
but I wondered if there was some other way to grab the information.

Romain

--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/9aKDM9 : embed images in Rd documents
|- http://tr.im/OIXN : raster images and RImageJ
|- http://tr.im/OcQe : Rcpp 0.7.7

Jason Hsueh

unread,
Apr 7, 2010, 3:48:52 PM4/7/10
to Romain Francois, Protocol Buffers, Kenton Varda
Kenton, do you have any experience compiling protobufs on OSX?


--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.


Kenton Varda

unread,
Apr 7, 2010, 8:46:00 PM4/7/10
to Jason Hsueh, Romain Francois, Protocol Buffers
You can download and install pkg-config pretty easily.

Typically the only flags needed to link against libprotobuf are -lprotobuf, -lz, and whatever flags are required by pthreads on your system.  No cflags are required unless your headers were installed somewhere unusual (but you might want -pthread to ensure that GCC produces thread-safe code).  Note, though, that these requirements could change in the future, if libprotobuf gains other dependencies.
Reply all
Reply to author
Forward
0 new messages