I'm trying, for the first time, to get protocol buffers to work sanely
on Windows. It's proving to be harder than I expected.

Partly, it's my own fault: I'm building the project with VS11-beta,
which I'm sure nobody has bothered to make work (and for good reason,
it is right there in the name: beta). I'm also building for 64-bit.
I'm also trying using a simple plugin I wrote in python.

However, I thought it was worth sharing some of the fun. Discoveries so far:

1) There are some unfortunate places where std::make_pair<T,U> is
invoked with the template arguments specified, which kind of begs the
question, why not just use the std::pair constructor? This causes some
confusion for VS11-beta (which in one case is kind of sad). There is
one case where the template argument specification is clearly used to
provoke a conversion from char[] to std::string. Another case, I'm not
sure what the value is. I recommend the following changes (should make
compilers happier and will use move semantics automagically in the
first case):

784c784
<    proto_path_.push_back(make_pair<string, string>("", "."));
---
>    proto_path_.push_back(make_pair(string(""), string(".")));
913c913
<       proto_path_.push_back(make_pair<string, string>(virtual_path,
disk_path));
---
>      proto_path_.push_back(make_pair(virtual_path, disk_path));

2) The gtest library fails miserably due its crufty use of std::tuple.
This is separate project and is likely the compilers fault anyway, so
I won't go in to details.

3) The extract_includes.bat script does not copy descriptor.proto
along with everything else. This seems like an oversight/mistake.

4) Plugins have to be exe's. That kind of sucks if the plugin is in a
scripting language. I was looking at adding logic so that if you use
the --plugin flag, and if the "executable"'s name ends in .cmd or
.bat, it would invoke cmd.exe /c ... style, but that seems to have a
bug in it I haven't addressed yet. Sigh.. Windows does such a good job
of killing the wondrous portability of scripting languages. :-(

-- 
Chris

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

Reply via email to