Anonymous avatar Anonymous committed c2a1c24

Make sure examples link properly.

Comments (0)

Files changed (2)

examples/Makefile

 	@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

examples/README.txt

   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.
 
 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.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.