We see this problem all the time.  Dummy references are the best solution.
 :(

You might also check if your linker has some sort of flag to control the
behavior but I have no idea what it may be.

On Mon, Feb 22, 2010 at 8:17 PM, Mark Assad <mas...@gmail.com> wrote:

> Hi,
>
>   Other than writing a dummy function that explicitly referecnes protobuf
> messages, do you have any hints for getting Microsoft Visual Studio (2005 in
> this case), to stop dropping the objects from the binary? I know it's not
> really a protobuf specific question, but I'm having problems where I read a
> bunch of protobuf files using the reflection API, but the descriptions are
> being lost due to linking.
>
>   My current fix is the dummy function, but it means i have to update the
> function every time i update the proto files. I was hoping maybe you've seen
> the problem and have seen a better solution. :)
>
> Thanks,
> Mark
>
> On Tue, Feb 23, 2010 at 10:12 AM, Kenton Varda <ken...@google.com> wrote:
>
>> My only guess is that your protobuf type wasn't actually referenced
>> anywhere in your program and so was dropped from the binary.  Some linkers
>> do this.  But it's weird that you have a pointer to an object whose class is
>> not compiled in.
>>
>> Sorry, I don't have any other ideas.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to