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 9168771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:42:19+00:00 2026-06-17T15:42:19+00:00

Attempting to get a very simple example of libconfig++ working. However I’m encountering the

  • 0

Attempting to get a very simple example of libconfig++ working. However I’m encountering the following link error due to the compiler options ‘-stdlib=libc++’ and ‘-std=c++11’.

Environment

Darwin iMac.local 12.2.0

Darwin Kernel Version 12.2.0

xnu-2050.18.24~1/RELEASE_X86_64 x86_64

Source

  Config cfg;

  cfg.readFile( "example.cfg" );

  string value = "";

  const string& key = "application.base";

  cfg.lookupValue( key, value );

Build

clang++ -o main main.cpp -lconfig++ -stdlib=libc++ -std=c++11

Error

Undefined symbols for architecture x86_64:   "libconfig::Config::lookupValue(char   const*, std::__1::basic_string<char, std::__1::char_traits<char>,   std::__1::allocator<char> >&) const", referenced from:  
      libconfig::Config::lookupValue(std::__1::basic_string<char,   std::__1::char_traits<char>, std::__1::allocator<char> > const&,   std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)   const in main-mFa01w.o ld: symbol(s) not found for architecture x86_64 clang:   error:   linker command failed with exit code 1 (use -v to see invocation)  
  • 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-17T15:42:20+00:00Added an answer on June 17, 2026 at 3:42 pm

    The error message indicates that this member function:

    libconfig::Config::lookupValue(const std::string& path, std::string& value) const;
    

    was compiled with -stdlib=libc++ (likely as an inline, but I’m guessing). And that it in turn calls this member function:

    libconfig::Config::lookupValue(char const* path, std::string& value) const
    

    However this latter function was not compiled with -stdlib=libc++.

    The most probable fix is to recompile libconfig++ with -stdlib=libc++.

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

Sidebar

Related Questions

I frequently get the following error when attempting to execute simple statements against a
I am new to WSO2 ESB and am attempting to get a very simple
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
I'm attempting to create a very simple stored procedure with one parameter in MS-Access
I'm attempting to build a very simple wxPython GUI that monitors and displays external
I am attempting to write a very simple rake task (and merge it into
I'm attempting to solve what I thought would be a very simple problem. I
I have the following, very simple html page: <html> <head> <script type="text/javascript"> function alertSelection()
I am attempting to code a very simple way for a user to add
I am attempting to create a very simple Microsoft DSS program in which I

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.