Hello all, I had the same issue when generating protos that contain 
Timestamp in Debian.

I got it working following this instructions:

https://gist.github.com/sofyanhadia/37787e5ed098c97919b8c593f0ec44d8

Please note my comment about creating a symlink instead of moving the 
binary.



On Thursday, 16 June 2016 02:19:56 UTC+10, Chad Beaulac wrote:
>
> A buildable solution is in my post here:
> https://groups.google.com/d/msg/protobuf/ecxdP_mN8OI/3FxhjiDaAQAJ
>
> Importing and fully qualified name worked for me.
>
>
> On Tuesday, June 14, 2016 at 10:18:10 AM UTC-7, Camilo Aguilar wrote:
>>
>> 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