Vala. How to connect SQLite in Anjuta IDE?

210 Views Asked by At

In line

using Sqlite;

an error occurs: "The namespace name` Sqlite 'could not be found "

I previously installed SQLite and command line compilation works :

valac --pkg gtk + -3.0 --pkg sqlite3 -X -lm SomeFile.vala

But if I create and compile a project in Anjuta, then an error occurs

1

There are 1 best solutions below

1
On BEST ANSWER

I use VS Code with VLS and Builder, but I think the same is true for Anjuta(is this IDE still alive?) For correct operation Vala Language Server all dependencies should be described in the Build file Meson. For the Vala Language Server to work correctly, all the dependencies must be described in the Meson Build file.

Here is an example that I use with the plugin for VS Code:

project('vala app', 'vala', 'c')

dependencies = [
    dependency('glib-2.0'),
    dependency('gobject-2.0'),
    dependency('sqlite3'),
    dependency('gee-0.8'),

]

sources = files('valite.vala')

executable('valite', sources, dependencies: dependencies, install: true)