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

  • SEARCH
  • Home
  • 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 575115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:54:11+00:00 2026-05-13T13:54:11+00:00

Hi I am getting this eror: Undefined symbols: _sqlite3_open, referenced from: _main in ccRlWVer.o

  • 0

Hi I am getting this eror:

Undefined symbols:
  "_sqlite3_open", referenced from:
      _main in ccRlWVer.o
  "_sqliite3_close", referenced from:
      _main in ccRlWVer.o
  "_sqlite3_exec", referenced from:
      _main in ccRlWVer.o
  "_sqlite3_errmsg", referenced from:
      _main in ccRlWVer.o
  "_sqlite3_close", referenced from:
      _main in ccRlWVer.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

This is my code:

const char * filename = "database.db";
sqlite3 * ppDb;
int rc;
rc = sqlite3_open(filename, &ppDb);
if( rc ){
    fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(ppDb));
    sqlite3_close(ppDb);
    exit(1);
}

char * errMsg = 0;
sqlite3_exec(ppDb, sql ,display_result, 0, &errMsg);
if( rc!=SQLITE_OK ){
    fprintf(stderr, "SQL error: %s\n", errMsg);
}


sqliite3_close(ppDb);
return 0;
  • 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-05-13T13:54:11+00:00Added an answer on May 13, 2026 at 1:54 pm

    You have to pass the library you wish to link your code with, in this situation it’s sqlite3.

    If you are using gcc try adding the:

    -lsqlite3 
    

    To your arguments you pass to gcc in your makefile/build command.

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

Sidebar

Related Questions

Am getting this error for my code: Undefined symbols for architecture x86_64: _spendDollars, referenced
Getting this error while compiling C++ code: undefined reference to `__stack_chk_fail' Options already tried:
I getting this error when retrieve xml request from http://www.cbr.ru/scripts/XML_daily.asp XML code like this:
Anyone getting this error when using the new free chart controls MS bought from
getting this error while linking an app, some one an idea? ld: duplicate symbol
Getting this error: Exception Value: Could not parse the remainder: ' + contact.last_name' from
Getting this error while trying to compile a copied code from a Fortran 77
Getting this error when I follow the simple code example from jsoncpp, that basically
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to

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.