I downloaded protobuf 2.3.0 full source and compiler...
I am running Windows Vista 32 bit
I installed everything and did the tests as stated in the readme file
- all test passed using the release version, 11 failed using the debug
version

so I went on to compile my .proto file that looks like:

message hello
{
        required string data = 1 [default = "Hello World"];
}

That created the hello.pb.h and the hello.pb.cc files

Next, I used this .cpp file to test to make sure everything works:

#include "stdafx.h"
#include "hello.pb.h"
#include <iostream>
#include <fstream>
#include <string>


using namespace std;

int main()
{
hello demo; // instance "demo" of the "hello" class defined in proto

const std::string& test = demo.data(); // data is the field where the
text was stored
cout << test << "\n";

demo.set_data("How do you do?"); // changing the data
cout << demo.data() << "\n";
return 0;
}

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

Reply via email to