Categories: Uncategorized

Working demo SQLite with C++ on Mac OSX Xcode

(Last Updated On: January 4, 2016)

Working demo SQLite with C++ on Mac OSX Xcode

This was developed for Mac OSX which seems the preferred database.

Problems with the alternatives databases:

Open source Maria DB does not work at all which appears to be a mess

MYSQL is unstable and incomplete thanks to Oracle butchering it

Postgres development libraries seem complex for Xcode or just does not link up for some reason

SQLite seems to be the only one that work. For my new version 2 system, this should be fine for very simplistics needs as long as I don’t need it for Clustering on multiple systems

Instructions here:

Install SQLite3 with: brew install sqlite3

This could already be installed by default in your  Mac OSX

You could use this to Download SQLiteBrowser from http://sqlitebrowser.org/

I installed using http://macappstore.org/sqlitebrowser/

brew cask install sqlitebrowser

I installed Valentina Studio through Apple OS X App store which is free

Could make a sample C++ client for SQLite

//tutorialspoint.com/sqlite/sqlite_c_cpp.htm

//http://forums.macrumors.com/threads/using-sqlite3-from-c-application.684791/

#include <stdio.h>

#include <sqlite3.h>

int main(int argc, char* argv[])

{

    sqlite3 *db;

    char *zErrMsg = 0;

    int rc;

    

    rc = sqlite3_open(“test.db”, &db);

    

    if( rc ){

        fprintf(stderr, “Can’t open database: %s\n”, sqlite3_errmsg(db));

        return -1;

    }else{

        fprintf(stderr, “Opened database successfully\n”);

    }

    sqlite3_close(db);

}

Join my FREE newsletter to see how SQLite should fit my simplistic needs for automated trading

My working demo with SQLite

Helpful tutorial video

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
caustic

Hi i there My name is Bryan Downing. I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties: C++, Java, C#, Matlab, quant, models, strategies, technical analysis, linux, windows P.S. I have been known to be the worst typist. Do not be offended by it as I like to bang stuff out and put priorty of what I do over typing. Maybe one day I can get a full time copy editor to help out. Do note I prefer videos as they are much easier to produce so check out my many video at youtube.com/quantlabs

Recent Posts

High-Frequency Trading Meets High-Performance Computing: Building Your Dream Career

The world of high-frequency trading (HFT) thrives on speed and precision, and high-performance computing (HPC)…

3 hours ago

Python Powers Algorithmic Trading: Mastering the Market with Code

This article explores the exciting opportunities for Python which powers algorithmic trading, equipping you with…

3 hours ago

Allure and Limitations of Open-Source Algorithmic Trading Systems

Here, we delve into the potential limitations of relying solely on open-source projects for youropen-source…

3 hours ago

Demystifying Latency: A C++ Deep Dive into High-Frequency Trading

Today, we join Brian, host of quantlabs.net, as he explores the intricate relationship between C++deep…

23 hours ago

High-Frequency Trading: Unveiling the Market Maker’s Dance

Welcome to the fast-paced realm of high-frequency trading (HFT), where milliseconds reign supreme and market…

23 hours ago

You’ve Been Chosen as an Engager!

I am thrilled to inform you that you have been chosen as someone who consistently…

1 day ago