Adding a custom sqlite function to a Qt application

前端 未结 1 1677
礼貌的吻别
礼貌的吻别 2021-01-18 23:24

I am trying to add a custom sqlite3 regexp function into my Qt application (as recommended by this answer). But as soon as I call the sqlite3_create_funct

相关标签:
1条回答
  • 2021-01-18 23:48

    You need to call sqlite3_initialize() after you get the database handle from Qt, according to this forum post.

        ...
        sqlite3 *db_handle = *static_cast<sqlite3 **>(v.data());
        if (db_handle != 0) { // check that it is not NULL
            sqlite3_initialize();
        ...
    

    This solves the issue.

    0 讨论(0)
提交回复
热议问题