Skip to content

Commit

Permalink
Make sure examples link properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenton Varda committed May 6, 2009
1 parent 415595c commit 1f492ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/Makefile
Expand Up @@ -22,10 +22,10 @@ protoc_middleman: addressbook.proto
@touch protoc_middleman

add_person_cpp: add_person.cc protoc_middleman
c++ add_person.cc addressbook.pb.cc -lprotobuf -o add_person_cpp
c++ add_person.cc addressbook.pb.cc -lprotobuf -lpthread -o add_person_cpp

list_people_cpp: list_people.cc protoc_middleman
c++ list_people.cc addressbook.pb.cc -lprotobuf -o list_people_cpp
c++ list_people.cc addressbook.pb.cc -lprotobuf -lpthread -o list_people_cpp

javac_middleman: AddPerson.java ListPeople.java protoc_middleman
javac AddPerson.java ListPeople.java com/example/tutorial/AddressBookProtos.java
Expand Down
6 changes: 5 additions & 1 deletion examples/README.txt
Expand Up @@ -15,11 +15,15 @@ creates the following executable files in the current directory:
add_person_java list_people_java
add_person_python list_people_python

If you only want to compile examples in one language, use "make cpp",
If you only want to compile examples in one language, use "make cpp"*,
"make java", or "make python".

All of these programs simply take an address book file as their parameter.
The add_person programs will create the file if it doesn't already exist.

These examples are part of the Protocol Buffers tutorial, located at:
http://code.google.com/apis/protocolbuffers/docs/tutorials.html

* Note that on some platforms you may have to edit the Makefile and remove
"-lpthread" from the linker commands (perhaps replacing it with something else).
We didn't do this automatically because we wanted to keep the example simple.

0 comments on commit 1f492ac

Please sign in to comment.