Strange, I don't know why you'd be getting permission denied errors, but I'm glad you figured out something that works.
On Fri, Oct 10, 2008 at 7:38 AM, <[EMAIL PROTECTED]> wrote: > > Thanks!! > > I also noticed that I get a permission denied error if I specify > either a valid path or "." for the --proto_path argument on the > command line. What I did to get it to work was to cd to the directory > the file is in, and then simply pass the file name to --cpp_out > without passing a --proto_path argument. The resulting code is now > compiles :) > > Below is how got .proto files compiling with protoc as a custom build > step in VS: > protobuild.cmd [inputs] > > protobuild.cmd is the following: > @echo off > cd "%~p1" > protoc.exe --cpp_out= "%~n1%~x1" > > The reason for the .cmd file is that the [inputs] macro from VS > provides the .proto file to the command line using a relative path. > The cmd file takes the relative path and expands it out to a fully > qualified path, filename and extension and passes it to protoc. > > > On Oct 9, 5:00 pm, "Kenton Varda" <[EMAIL PROTECTED]> wrote: > > On Thu, Oct 9, 2008 at 12:52 PM, <[EMAIL PROTECTED]> wrote: > > > protoc.exe --cpp_out= "[Fully qualified path name]" > > > > Ah, ok, you've identified a bug. protoc is supposed to reject any input > > file which is not located within the import path. The import path is > > specified using --proto_path and defaults to the current directory. The > > problem is that protoc detects whether an input file's path is absolute > > based on whether it starts with a slash, but on Windows absolute paths > don't > > start with a slash. So, protoc failed to report the incorrect input > path. > > > > To fix this, you can either do: > > > > protoc --proto_path="[full path of current directory]" --cpp_out=. > "[full > > path of input file]" > > > > Or do: > > > > protoc --cpp_out=. "[file name without path]" > > > > I'll make sure the bug gets fixed. Thanks. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
