I'm also  unable to use the Timestamp type, using the fully qualified path 
didn't seem to work for me. 

On Friday, May 6, 2016 at 8:00:26 PM UTC-4, Nathaniel Weems wrote:
>
> Using the fully qualified path "google.protobuf.Timestamp" works.
>
> On Friday, June 12, 2015 at 6:34:32 AM UTC-6, Robin wrote:
>>
>> I installed protobuf with the following homebrew command on OS X 10.10.3: 
>> brew install protobuf --devel
>> The binary is symlinked to /us/local/bin and the includes are symlinked 
>> to /usr/local/include/google/protobuf/timestamp.proto (which is present as 
>> I confirmed).
>>
>> Which include path do you mean, the protoc -IPATH? And should it be 
>> sufficient in my .proto file to just use Timestamp or should I use the full 
>> google.protobuf.Timestamp?
>>
>> On Friday, June 12, 2015 at 8:41:18 AM UTC+2, 肖锋 wrote:
>>>
>>>
>>>
>>> On Thursday, June 11, 2015 at 6:08:33 PM UTC-7, Robin wrote:
>>>>
>>>> Hi everyone,
>>>>
>>>> I have installed protobuf3.0.0-alpha-3 on my machine and have the 
>>>> following proto file:
>>>>
>>>> syntax = "proto3";
>>>>
>>>> package my.great.package;
>>>>
>>>> import "google/protobuf/timestamp.proto";
>>>>
>>>> option java_outer_classname = "TimestampedThingMsg";
>>>>
>>>> message TimestampedThing {
>>>>     
>>>>     string thing = 1;
>>>>     Timestamp date = 2;
>>>>     
>>>> }
>>>>
>>>> However when I run "protoc protobuf/timestamped_thing.proto" I get the 
>>>> following two errors:
>>>>
>>>> protobuf/timestamped_thing.proto: Import 
>>>> "google/protobuf/timestamp.proto" was not found or had errors.
>>>>
>>>> protobuf/timestamped_thing.proto:15:5: "Timestamp" is not defined.
>>>>
>>> protoc should be able to find these types automatically if they are 
>>> installed with protoc. Where did you install the protoc binary? Could you 
>>> check whether you can find google/protobuf/timestamp.proto in your include 
>>> path? These protos should be installed along with protobuf header files.
>>>  
>>>
>>>>
>>>> How can I import the new Timestamp message type (source file: 
>>>> https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto)
>>>>  
>>>> to use it in my own messages?
>>>>
>>>> The only related example I could find in the docs was for the Any type 
>>>> where the import looks exactly like mine so not sure how to go about this. 
>>>> Docs link: 
>>>> https://developers.google.com/protocol-buffers/docs/proto3#any
>>>>
>>>>
>>>> Thanks!
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to