Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7872771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:18:38+00:00 2026-06-03T02:18:38+00:00

I grep for other topics, but they dont help me =(. On my working

  • 0

I grep for other topics, but they dont help me =(.
On my working server, i have no sudo privilegies, so i install PB with

./configure –prefix=/home/username/local

Then i create source files with “person” example and succesfully compile it with protoc.

I have no pkg-info =(. I try to compile it with

g++ -I /home/username/local/include -L /home/username/local/lib -lprotobuf
-lpthread main.cpp person.pb.cc

and then have a billion simular errors i.e.

person.pb.cc:(.text+0x4cf): undefined reference to
`google::protobuf::internal::kEmptyString’

I think, that it is a problem with linking, but how to solve it?

echo $LD_LIBRARY_PATH
/home/username/local/lib

in main.cpp:

#include "person.pb.h"
...

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:18:40+00:00Added an answer on June 3, 2026 at 2:18 am

    Put the library at the end:

    g++ -I /home/username/local/include -L /home/username/local/lib main.cpp person.pb.cc -lprotobuf -pthread

    From GCC Link Options:

    -llibrary
    -l library
        Search the library named library when linking. 
        (The second alternative with the library as a separate argument
        is only for POSIX compliance and is not recommended.)
    
        It makes a difference where in the command you write this option;
        the linker searches and processes libraries and object files in the
        order they are specified.
        Thus, `foo.o -lz bar.o' searches library `z' after file foo.o but
        before bar.o. If bar.o refers to functions in `z', those functions
        may not be loaded.
    

    Also, use -pthread instead of -lpthread as -pthread may set flags for preprocessor and linker.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following XML output when I grep for Server: <Server id=1 src=/other/Server/PRX01/PRX01.xml/>
I have a workflow where I use grep and other tools in a shell
Is there an easy way using grep (or combine with other standard command line
I have output from grep I'm trying to clean up that looks like: <words>Http://www.path.com/words</words>
I am using GNU grep on Windows 7 command prompt. I have a file
I want to grep files that contain text "wp_" but do not contain text
I have been using grep with perl extension for multiline match .However it turns
grep -A 26 some text somefile.txt | awk '/other text/ { gsub(/M/, ); print
I have a file and I wish to grep out all the lines that
I am currently recompiling gtk+ and dependencies from source (I have no other choices).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.