Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Linker error when using Protocol Buffers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Patryk Steckel  
View profile  
 More options Oct 3 2012, 10:37 am
From: Patryk Steckel <patrykstec...@gmail.com>
Date: Wed, 3 Oct 2012 07:37:50 -0700 (PDT)
Local: Wed, Oct 3 2012 10:37 am
Subject: Linker error when using Protocol Buffers

I generated serial.pb.h and serial.pb.cc using protoc. Then I added those
files to project and I got linker errors. Can anyone help?

main.cpp:

#include "serial.pb.h"

int main()
{
    Person person;
    person.set_name("Patryk");
    return 0;

}

Output:

1>------ Build started: Project: Serialize_vc10, Configuration: X86 Debug
Win32 ------
1>  main.cpp
1>     Creating library Debug_Serialize_vc10_x86\Serialize.lib and object
Debug_Serialize_vc10_x86\Serialize.exp
1>main.obj : error LNK2019: unresolved external symbol "public: virtual
__thiscall Person::~Person(void)" (??1Person@@UAE@XZ) referenced in
function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall
Person::Person(void)" (??0Person@@QAE@XZ) referenced in function _main
1>Debug_Serialize_vc10_x86\Serialize.s86 : fatal error LNK1120: 2
unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic