Go into your protoc "include" folder and create a folder called 
"protobuf-net" and then move a file called bcl.proto into that folder (You 
can get bcl.proto from: 
https://github.com/protobuf-net/protobuf-net/blob/main/src/Tools/bcl.proto 
copy all content from that into bcl.proto)
[email protected] schrieb am Donnerstag, 22. Dezember 2022 um 13:56:04 
UTC+1:

> Hi all.
> I have a proto file "MyStatusDto.proto" that is using bcl.proto for 
> DateTime type. (the protobuf is in this case used for communication between 
> a C++ and a C# app, and the proto file is generated from the C# contract 
> class). But when I try to compile the proto file for cpp, the protoc 
> complains about missing bcl.proto. What am I missing in order to get the 
> import bcl to work?
> //Johan
>
> *File MyStatusDto.proto:*
> syntax = "proto3";
> import "protobuf-net/bcl.proto"; // schema for protobuf-net's handling of 
> core .NET types
>
> message  MyStatusDto  {
>    bool Active = 1;
>    int32 RecordCount = 2;
>    .bcl.DateTime LastRecordedTimestamp = 3;
> }
>
> *Command:*
> protoc --cpp_out=.  MyStatusDto.proto
>
> *Output:*
> protobuf-net/bcl.proto: File not found.
> MyStatusDto.proto:3:1: Import "protobuf-net/bcl.proto" was not found or 
> had errors.
> MyStatusDto.proto:8:4: ".bcl.DateTime" is not defined.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/d5d3a7d1-0743-4e17-a0bd-7448c0cc6125n%40googlegroups.com.

Reply via email to