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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:16:25+00:00 2026-05-23T16:16:25+00:00

I suppose using phobos.etc.c.sqlite3 binding. Compiling sqlite3.c using a C compiler to make a

  • 0

I suppose using phobos.etc.c.sqlite3 binding. Compiling sqlite3.c using a C compiler to make a .o file and then link it with my program.

Which C compiler should I use, and what compiler flags?
Is it possible link the sqlite3.o with DMD in one step, without calling linker separately?

Or is there some other even easier way?

Answer: How to get Sqlite going with D on 64bit Ubuntu

  1. install sqlite dev sudo apt-get install libsqlite3-dev

  2. compile dmd test.d -L-ldl -L/usr/lib/x86_64-linux-gnu/libsqlite3.a

test.d

import std.stdio, std.string, etc.c.sqlite3;

void main () {
    sqlite3* db;
    auto ret = sqlite3_open (toStringz("mydb.s3db"), &db);
    writeln (ret);
}

-ldl switch was needed because of sqlite3 linking problems

  • 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-23T16:16:26+00:00Added an answer on May 23, 2026 at 4:16 pm

    You can use the binding with an available sqlite library (of an appropriate version, certainly), without having to manually compile it to an object file. Just like what you would have done in C: you’d #include <headers> and add -llibrary to compiler flags. The same here — import, and a link directive.

    EDIT:

    On Ubuntu you can install precompiled sqlite using the following command:

    sudo apt-get install libsqlite3-dev
    

    Also, see http://prowiki.org/wiki4d/wiki.cgi?DatabaseBindings#SQLite for some other sqlite binding variants.

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

Sidebar

Related Questions

Suppose I write a program using immutable data structures in Java. Even though it
Suppose I want to open a file in an existing Emacs session using su
Suppose you are using a control such as NumericUpDown which has the value property.
Suppose I'm using the typeclass pattern in Scala. Here's how I make a class
Suppose I have an .rda file created using save() . Example: save(mydata1, file =
suppose I implemented my site using Zend Framework and then after some time scalability
Suppose we have a shared queue (implemented using an array), which two threads can
Suppose I'm using transactional replication to replicate articles from one server to another (
Let's suppose I'm using the Northwind database and I would like to run a
Suppose this C# code: using (MemoryStream stream = new MemoryStream()) { StreamWriter normalWriter =

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.