diff --git a/qtcreator/example1/example1.pro b/qtcreator/example1/example1.pro new file mode 100644 index 0000000..6e0fad2 --- /dev/null +++ b/qtcreator/example1/example1.pro @@ -0,0 +1,17 @@ + +TEMPLATE = app + +CONFIG += console +CONFIG -= app_bundle +CONFIG -= qt + +INCLUDEPATH += \ + ../../sqlite3 + +LIBS += \ + -L../../libs \ + -lsqlitecpp-static + +SOURCES += \ + ../../examples/example1/main.cpp + diff --git a/qtcreator/sqlitecpp-shared/sqlitecpp-shared.pro b/qtcreator/sqlitecpp-shared/sqlitecpp-shared.pro new file mode 100644 index 0000000..ae8d27b --- /dev/null +++ b/qtcreator/sqlitecpp-shared/sqlitecpp-shared.pro @@ -0,0 +1,34 @@ + +TEMPLATE = lib + +CONFIG += console +CONFIG += sharedlib + +CONFIG -= app_bundle +CONFIG -= qt + +DESTDIR = \ + ../../libs + +QMAKE_CFLAGS += \ + -Wno-sign-compare + +INCLUDEPATH +=\ + ../../sqlite3 + +SOURCES += \ + ../../sqlite3/sqlite3.c \ + ../../src/Transaction.cpp \ + ../../src/Statement.cpp \ + ../../src/Database.cpp \ + ../../src/Column.cpp + +HEADERS += \ + ../../sqlite3/sqlite3.h \ + ../../src/Transaction.h \ + ../../src/Statement.h \ + ../../src/SQLiteC++.h \ + ../../src/Exception.h \ + ../../src/Database.h \ + ../../src/Column.h \ + ../../src/Assertion.h diff --git a/qtcreator/sqlitecpp-static/sqlitecpp-static.pro b/qtcreator/sqlitecpp-static/sqlitecpp-static.pro new file mode 100644 index 0000000..3324b5b --- /dev/null +++ b/qtcreator/sqlitecpp-static/sqlitecpp-static.pro @@ -0,0 +1,34 @@ + +TEMPLATE = lib + +CONFIG += console +CONFIG += staticlib + +CONFIG -= app_bundle +CONFIG -= qt + +DESTDIR = \ + ../../libs + +QMAKE_CFLAGS += \ + -Wno-sign-compare + +INCLUDEPATH +=\ + ../../sqlite3 + +SOURCES += \ + ../../sqlite3/sqlite3.c \ + ../../src/Transaction.cpp \ + ../../src/Statement.cpp \ + ../../src/Database.cpp \ + ../../src/Column.cpp + +HEADERS += \ + ../../sqlite3/sqlite3.h \ + ../../src/Transaction.h \ + ../../src/Statement.h \ + ../../src/SQLiteC++.h \ + ../../src/Exception.h \ + ../../src/Database.h \ + ../../src/Column.h \ + ../../src/Assertion.h diff --git a/src/Assertion.h b/src/Assertion.h index a4256cd..6322c1b 100644 --- a/src/Assertion.h +++ b/src/Assertion.h @@ -25,15 +25,15 @@ // if an assert handler is provided by user code, use it instead of assert() namespace SQLite { - // declaration of the assert handler to define in user code - void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg); + // declaration of the assert handler to define in user code + void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg); #ifdef _MSC_VER - #define __func__ __FUNCTION__ + #define __func__ __FUNCTION__ #endif // call the assert handler provided by user code #define SQLITECPP_ASSERT(expression,message) \ - if (!(expression)) SQLite::assertion_failed(__FILE__, __LINE__, __func__, #expression, message) + if (!(expression)) SQLite::assertion_failed(__FILE__, __LINE__, __func__, #expression, message) } #else @@ -45,6 +45,6 @@ namespace SQLite #endif -#ifdef _WIN32 +#if defined(_WIN32) && defined(_MSC_VER) #pragma warning(disable:4290) // Disable warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow) #endif