I'm working on windows, some of my projects are dlls.
i need to add __declspec dllexport/dllimport symbol with the function or variables to use the project as dll.
but when i use protoc generate the source for the proto file, of course they don't have the dllexport/dllimport symbol.
the problem is after build dll A(have a proto), when i build B link the project A, i got some link error like this:
error LNK2019: unresolved external symbol "void PB:protobuf_AddDesc_Point2df_2eproto(void)""..................
because the function "void PB:protobuf_AddDesc_Point2df_2eproto(void)" in dll A didn't export,
so the project B link faild.
anything help would be wonderful.
-----------------------------------------------the situation like this-------------------------------------------
in DLL-A, have a proto like this:
---------point.proto---------
package PB;
message Point2df
{
required float x = 1;
required float y = 2;
}
in DLL-B, have a proto like this;
---------path.proto---------
package PB;
import "point.proto";
message Path
{
repeated Point2df points = 1;
}