petdr / protobuf-mercury

Automatically exported from code.google.com/p/protobuf-mercury

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Protocol buffers for Mercury
----------------------------

First install Google's protoc
(available from http://code.google.com/p/protobuf/).

Then install a recent version of Mercury.

If you are building from an svn checkout do:

    autoreconf -i
    ./configure
    make
    make check
    sudo make install

If you are building from the distribution you can omit the autoreconf step.

If you get a link error you may need to run ldconfig and try again.

To generate a Mercury module file from a .proto file do:

    mprotoc my_protocol.proto --out .

This will generate the module my_protocol.m in the current directory.

The runtime module is located in the mercury directory (protobuf_runtime.m).
This module is not installed by default.  You can install it using mmc --make
or you can simply copy it into your source tree.

Note that you may get some warnings from mmc about unused imports when
compiling the generated module.  You can turn these off by adding a line
like:

    MCFLAGS-my_protocol+=--inhibit-warnings

to your Mercury.options file.

For an example of how to use protocol buffers in Mercury, see the samples
directory.

About

Automatically exported from code.google.com/p/protobuf-mercury


Languages

Language:C++ 55.6%Language:Mercury 40.5%Language:Makefile 1.7%Language:Protocol Buffer 1.1%Language:Shell 1.0%