Skip to content

Getting started #9

@matpen

Description

@matpen

I am trying to get started with the library, and I successfully built it using the provided instructions.

However, I am having issues when trying to build a simple test project.
Here is my .pro file:

QT += core gui widgets sql
CONFIG += c++14

TARGET = test_sqlate
TEMPLATE = app

INCLUDEPATH += /opt/sqlate/include
LIBS += -L/opt/sqlate/lib -lsqlate

SOURCES += main.cpp

And here is my main.cpp:

#include <QApplication>
#include <SqlSchema.h>
#include <Sql.h>

//copied from README.md
TABLE( Presenters) {
    SQL_NAME( "presenters" );
    COLUMN( name, QString, NotNull );
    COLUMN( age, int, NotNull );
    COLUMN( company, QString);
    typedef boost::mpl::vector<nameType, ageType, companyType> columns;
};

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    return 0;
}

I am getting the error no match for operator% (operand types are QLatin1Literal and QString), along with others.
Is there anything I am missing? I am using Qt 5.7 with GCC 5.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions