srombauts / sqlitecpp Goto Github PK
View Code? Open in Web Editor NEWSQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
Home Page: http://srombauts.github.io/SQLiteCpp
License: MIT License
SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
Home Page: http://srombauts.github.io/SQLiteCpp
License: MIT License
What is the preferred way of using getColumn(#).getText() when the value could be null?
Currently I am using isNull() before running the query but I am not sure if that is the best way.
Hi Sebastien,
I ran into an issue where I'm trying to do asynchronous concurrency on my application to keep the UI thread available. However, this ends up causing issues where transactions become embedded.
I believe sqlite does not allow begin and commits to be embedded but it does allow a form of embedded transactions to be supported using SAVEPOINT and RELEASE.
https://www.sqlite.org/lang_savepoint.html
Does SQLiteCpp support this?
How to create Database and table in this code?? please support for me thanks
Hello,
I've just update the source and build it.
However, I have some build error such as MSB1009.
Here is the log message........
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>v:
V:\>cd "03 git_repo"
V:\03 git_repo>cd SQLiteCpp
V:\03 git_repo\SQLiteCpp>ls
'ls'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.
V:\03 git_repo\SQLiteCpp>dir
V 드라이브의 볼륨: e-Docu.
볼륨 일련 번호: E8A6-3ACA
V:\03 git_repo\SQLiteCpp 디렉터리
2016-07-09 오후 04:52 <DIR> .
2016-07-09 오후 04:52 <DIR> ..
2016-07-09 오후 04:36 31,916 .cproject
2016-07-09 오후 04:36 250 .gitignore
2016-07-09 오후 04:36 112 .gitmodules
2016-07-09 오후 04:36 2,584 .project
2016-07-09 오후 04:36 3,726 .travis.yml
2016-07-09 오후 04:36 757 appveyor.yml
2015-07-24 오후 05:02 1,564 biicode.conf
2016-07-09 오후 05:06 <DIR> build
2016-07-09 오후 04:36 507 build.bat
2016-07-09 오후 04:36 538 build.sh
2016-07-09 오후 04:36 3,708 CHANGELOG.txt
2016-07-09 오후 04:36 11,098 CMakeLists.txt
2016-07-09 오후 04:36 189,732 cpplint.py
2016-07-09 오후 04:36 102,607 Doxyfile
2015-07-24 오후 05:02 <DIR> examples
2016-07-09 오후 04:36 2,148 FindSQLiteCpp.cmake
2016-07-09 오후 04:36 <DIR> googletest
2016-07-09 오후 04:48 <DIR> include
2016-07-09 오후 04:36 1,141 LICENSE.txt
2016-07-09 오후 04:36 12,688 README.md
2016-07-09 오후 04:37 <DIR> sqlite3
2016-07-09 오후 04:37 <DIR> src
2016-07-09 오후 04:37 <DIR> tests
2016-07-09 오후 04:36 1,340 TODO.txt
17개 파일 366,416 바이트
9개 디렉터리 138,661,863,424 바이트 남음
V:\03 git_repo\SQLiteCpp>dir
V 드라이브의 볼륨: e-Docu.
볼륨 일련 번호: E8A6-3ACA
V:\03 git_repo\SQLiteCpp 디렉터리
2016-07-09 오후 05:07 <DIR> .
2016-07-09 오후 05:07 <DIR> ..
2016-07-09 오후 04:36 31,916 .cproject
2016-07-09 오후 04:36 250 .gitignore
2016-07-09 오후 04:36 112 .gitmodules
2016-07-09 오후 04:36 2,584 .project
2016-07-09 오후 04:36 3,726 .travis.yml
2016-07-09 오후 04:36 757 appveyor.yml
2015-07-24 오후 05:02 1,564 biicode.conf
2016-07-09 오후 04:36 507 build.bat
2016-07-09 오후 04:36 538 build.sh
2016-07-09 오후 04:36 3,708 CHANGELOG.txt
2016-07-09 오후 04:36 11,098 CMakeLists.txt
2016-07-09 오후 04:36 189,732 cpplint.py
2016-07-09 오후 04:36 102,607 Doxyfile
2015-07-24 오후 05:02 <DIR> examples
2016-07-09 오후 04:36 2,148 FindSQLiteCpp.cmake
2016-07-09 오후 04:36 <DIR> googletest
2016-07-09 오후 04:48 <DIR> include
2016-07-09 오후 04:36 1,141 LICENSE.txt
2016-07-09 오후 04:36 12,688 README.md
2016-07-09 오후 04:37 <DIR> sqlite3
2016-07-09 오후 04:37 <DIR> src
2016-07-09 오후 04:37 <DIR> tests
2016-07-09 오후 04:36 1,340 TODO.txt
17개 파일 366,416 바이트
8개 디렉터리 138,652,999,680 바이트 남음
V:\03 git_repo\SQLiteCpp>build
V:\03 git_repo\SQLiteCpp>mkdir build
V:\03 git_repo\SQLiteCpp>cd build
V:\03 git_repo\SQLiteCpp\build>cmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_B
UILD_TESTS=ON ..
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX_COMPILER 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bi
n/cl.exe' 'MSVC' '18.0.40629.0'
-- CMAKE_CXX_FLAGS ' /DWIN32 /D_WINDOWS /W3 /GR /EHsc'
-- CMAKE_CXX_FLAGS_DEBUG '/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /MTd'
-- CMAKE_CXX_FLAGS_RELEASE '/MD /O2 /Ob2 /D NDEBUG /MT'
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO '/MD /Zi /O2 /Ob1 /D NDEBUG'
-- CMAKE_CXX_FLAGS_MINSIZEREL '/MD /O1 /Ob1 /D NDEBUG'
-- Found PythonInterp: C:/Anaconda3/python.exe (found version "3.4.3")
-- Found Python: C:/Anaconda3/python.exe
-- Could NOT find cppcheck
-- SQLITECPP_RUN_DOXYGEN OFF
CMake Error at CMakeLists.txt:252 (add_subdirectory):
The source directory
V:/03 git_repo/SQLiteCpp/googletest/CMakeLists.txt
does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
See also "V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeOutput.log".
V:\03 git_repo\SQLiteCpp\build>cmake --build .
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: 프로젝트 파일이 없습니다.
스위치: ALL_BUILD.vcxproj
V:\03 git_repo\SQLiteCpp\build>ctest --output-on-failure
Test project V:/03 git_repo/SQLiteCpp/build
No tests were found!!!
V:\03 git_repo\SQLiteCpp\build>cd ..
V:\03 git_repo\SQLiteCpp>
Here is "CMakeOutput.log"
The system is: Windows - 6.1 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler:
Build flags:
Id flags:
The output was:
0
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
빌드 시작: 2016-07-09 오후 5:08:33
1 노드의 "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\3.3.0-rc2\CompilerIdC\CompilerIdC.vcxproj" 프로젝트(기본 대상)입니다.
PrepareForBuild:
"Debug\" 디렉터리를 만들고 있습니다.
"Debug\CompilerIdC.tlog\" 디렉터리를 만들고 있습니다.
InitializeBuildStatus:
"AlwaysCreate"이(가) 지정되었기 때문에 "Debug\CompilerIdC.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCCompilerId.obj
CompilerIdC.vcxproj -> V:\03 git_repo\SQLiteCpp\build\CMakeFiles\3.3.0-rc2\CompilerIdC\.\CompilerIdC.exe
PostBuildEvent:
for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i
:VCEnd
CMAKE_C_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe
FinalizeBuildStatus:
"Debug\CompilerIdC.tlog\unsuccessfulbuild" 파일을 삭제하고 있습니다.
"Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate"에 연결(touching)하고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\3.3.0-rc2\CompilerIdC\CompilerIdC.vcxproj" 프로젝트를 빌드했습니다(기본 대상).
빌드했습니다.
경고 0개
오류 0개
경과 시간: 00:00:12.86
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe"
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj"
The C compiler identification is MSVC, found in "V:/03 git_repo/SQLiteCpp/build/CMakeFiles/3.3.0-rc2/CompilerIdC/CompilerIdC.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler:
Build flags:
Id flags:
The output was:
0
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
빌드 시작: 2016-07-09 오후 5:08:51
1 노드의 "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\3.3.0-rc2\CompilerIdCXX\CompilerIdCXX.vcxproj" 프로젝트(기본 대상)입니다.
PrepareForBuild:
"Debug\" 디렉터리를 만들고 있습니다.
"Debug\CompilerIdCXX.tlog\" 디렉터리를 만들고 있습니다.
InitializeBuildStatus:
"AlwaysCreate"이(가) 지정되었기 때문에 "Debug\CompilerIdCXX.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue CMakeCXXCompilerId.cpp
CMakeCXXCompilerId.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCXXCompilerId.obj
CompilerIdCXX.vcxproj -> V:\03 git_repo\SQLiteCpp\build\CMakeFiles\3.3.0-rc2\CompilerIdCXX\.\CompilerIdCXX.exe
PostBuildEvent:
for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i
:VCEnd
CMAKE_CXX_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe
FinalizeBuildStatus:
"Debug\CompilerIdCXX.tlog\unsuccessfulbuild" 파일을 삭제하고 있습니다.
"Debug\CompilerIdCXX.tlog\CompilerIdCXX.lastbuildstate"에 연결(touching)하고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\3.3.0-rc2\CompilerIdCXX\CompilerIdCXX.vcxproj" 프로젝트를 빌드했습니다(기본 대상).
빌드했습니다.
경고 0개
오류 0개
경과 시간: 00:00:10.51
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe"
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.vcxproj"
The CXX compiler identification is MSVC, found in "V:/03 git_repo/SQLiteCpp/build/CMakeFiles/3.3.0-rc2/CompilerIdCXX/CompilerIdCXX.exe"
Determining if the C compiler works passed with the following output:
Change Dir: V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe" "cmTC_8d547.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=12.0"
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
빌드 시작: 2016-07-09 오후 5:09:05
1 노드의 "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_8d547.vcxproj" 프로젝트(기본 대상)입니다.
PrepareForBuild:
"cmTC_8d547.dir\Debug\" 디렉터리를 만들고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\" 디렉터리를 만들고 있습니다.
"cmTC_8d547.dir\Debug\cmTC_8d547.tlog\" 디렉터리를 만들고 있습니다.
InitializeBuildStatus:
"AlwaysCreate"이(가) 지정되었기 때문에 "cmTC_8d547.dir\Debug\cmTC_8d547.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTC_8d547.dir\Debug\\" /Fd"cmTC_8d547.dir\Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\testCCompiler.c"
x86용 Microsoft (R) C/C++ 최적화 컴파일러 버전 18.00.40629
Copyright (c) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTC_8d547.dir\Debug\\" /Fd"cmTC_8d547.dir\Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\testCCompiler.c"
testCCompiler.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_8d547.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_8d547.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_8d547.lib" /MACHINE:X86 /SAFESEH /machine:X86 /debug cmTC_8d547.dir\Debug\testCCompiler.obj
cmTC_8d547.vcxproj -> V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_8d547.exe
FinalizeBuildStatus:
"cmTC_8d547.dir\Debug\cmTC_8d547.tlog\unsuccessfulbuild" 파일을 삭제하고 있습니다.
"cmTC_8d547.dir\Debug\cmTC_8d547.tlog\cmTC_8d547.lastbuildstate"에 연결(touching)하고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_8d547.vcxproj" 프로젝트를 빌드했습니다(기본 대상).
빌드했습니다.
경고 0개
오류 0개
경과 시간: 00:00:12.15
Detecting C compiler ABI info compiled with the following output:
Change Dir: V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe" "cmTC_c1bc2.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=12.0"
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
빌드 시작: 2016-07-09 오후 5:09:19
1 노드의 "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_c1bc2.vcxproj" 프로젝트(기본 대상)입니다.
PrepareForBuild:
"cmTC_c1bc2.dir\Debug\" 디렉터리를 만들고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\" 디렉터리를 만들고 있습니다.
"cmTC_c1bc2.dir\Debug\cmTC_c1bc2.tlog\" 디렉터리를 만들고 있습니다.
InitializeBuildStatus:
"AlwaysCreate"이(가) 지정되었기 때문에 "cmTC_c1bc2.dir\Debug\cmTC_c1bc2.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTC_c1bc2.dir\Debug\\" /Fd"cmTC_c1bc2.dir\Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeCCompilerABI.c"
x86용 Microsoft (R) C/C++ 최적화 컴파일러 버전 18.00.40629
Copyright (c) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTC_c1bc2.dir\Debug\\" /Fd"cmTC_c1bc2.dir\Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeCCompilerABI.c"
CMakeCCompilerABI.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_c1bc2.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_c1bc2.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_c1bc2.lib" /MACHINE:X86 /SAFESEH /machine:X86 /debug cmTC_c1bc2.dir\Debug\CMakeCCompilerABI.obj
cmTC_c1bc2.vcxproj -> V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_c1bc2.exe
FinalizeBuildStatus:
"cmTC_c1bc2.dir\Debug\cmTC_c1bc2.tlog\unsuccessfulbuild" 파일을 삭제하고 있습니다.
"cmTC_c1bc2.dir\Debug\cmTC_c1bc2.tlog\cmTC_c1bc2.lastbuildstate"에 연결(touching)하고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_c1bc2.vcxproj" 프로젝트를 빌드했습니다(기본 대상).
빌드했습니다.
경고 0개
오류 0개
경과 시간: 00:00:07.59
Determining if the CXX compiler works passed with the following output:
Change Dir: V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe" "cmTC_78447.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=12.0"
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
빌드 시작: 2016-07-09 오후 5:09:30
1 노드의 "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_78447.vcxproj" 프로젝트(기본 대상)입니다.
PrepareForBuild:
"cmTC_78447.dir\Debug\" 디렉터리를 만들고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\" 디렉터리를 만들고 있습니다.
"cmTC_78447.dir\Debug\cmTC_78447.tlog\" 디렉터리를 만들고 있습니다.
InitializeBuildStatus:
"AlwaysCreate"이(가) 지정되었기 때문에 "cmTC_78447.dir\Debug\cmTC_78447.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_78447.dir\Debug\\" /Fd"cmTC_78447.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
x86용 Microsoft (R) C/C++ 최적화 컴파일러 버전 18.00.40629
Copyright (c) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_78447.dir\Debug\\" /Fd"cmTC_78447.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
testCXXCompiler.cxx
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_78447.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_78447.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_78447.lib" /MACHINE:X86 /SAFESEH /machine:X86 /debug cmTC_78447.dir\Debug\testCXXCompiler.obj
cmTC_78447.vcxproj -> V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_78447.exe
FinalizeBuildStatus:
"cmTC_78447.dir\Debug\cmTC_78447.tlog\unsuccessfulbuild" 파일을 삭제하고 있습니다.
"cmTC_78447.dir\Debug\cmTC_78447.tlog\cmTC_78447.lastbuildstate"에 연결(touching)하고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_78447.vcxproj" 프로젝트를 빌드했습니다(기본 대상).
빌드했습니다.
경고 0개
오류 0개
경과 시간: 00:00:06.82
Detecting CXX compiler ABI info compiled with the following output:
Change Dir: V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe" "cmTC_00421.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=12.0"
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
빌드 시작: 2016-07-09 오후 5:09:38
1 노드의 "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_00421.vcxproj" 프로젝트(기본 대상)입니다.
PrepareForBuild:
"cmTC_00421.dir\Debug\" 디렉터리를 만들고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\" 디렉터리를 만들고 있습니다.
"cmTC_00421.dir\Debug\cmTC_00421.tlog\" 디렉터리를 만들고 있습니다.
InitializeBuildStatus:
"AlwaysCreate"이(가) 지정되었기 때문에 "cmTC_00421.dir\Debug\cmTC_00421.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_00421.dir\Debug\\" /Fd"cmTC_00421.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue "C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeCXXCompilerABI.cpp"
x86용 Microsoft (R) C/C++ 최적화 컴파일러 버전 18.00.40629
Copyright (c) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_00421.dir\Debug\\" /Fd"cmTC_00421.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue "C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeCXXCompilerABI.cpp"
CMakeCXXCompilerABI.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_00421.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_00421.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_00421.lib" /MACHINE:X86 /SAFESEH /machine:X86 /debug cmTC_00421.dir\Debug\CMakeCXXCompilerABI.obj
cmTC_00421.vcxproj -> V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_00421.exe
FinalizeBuildStatus:
"cmTC_00421.dir\Debug\cmTC_00421.tlog\unsuccessfulbuild" 파일을 삭제하고 있습니다.
"cmTC_00421.dir\Debug\cmTC_00421.tlog\cmTC_00421.lastbuildstate"에 연결(touching)하고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_00421.vcxproj" 프로젝트를 빌드했습니다(기본 대상).
빌드했습니다.
경고 0개
오류 0개
경과 시간: 00:00:05.54
Detecting CXX [] compiler features compiled with the following output:
Change Dir: V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe" "cmTC_a3415.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=12.0"
Microsoft (R) Build Engine 버전 12.0.40629.0
[Microsoft .NET Framework, 버전 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
빌드 시작: 2016-07-09 오후 5:09:45
1 노드의 "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_a3415.vcxproj" 프로젝트(기본 대상)입니다.
PrepareForBuild:
"cmTC_a3415.dir\Debug\" 디렉터리를 만들고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\" 디렉터리를 만들고 있습니다.
"cmTC_a3415.dir\Debug\cmTC_a3415.tlog\" 디렉터리를 만들고 있습니다.
InitializeBuildStatus:
"AlwaysCreate"이(가) 지정되었기 때문에 "cmTC_a3415.dir\Debug\cmTC_a3415.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_a3415.dir\Debug\\" /Fd"cmTC_a3415.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\feature_tests.cxx"
x86용 Microsoft (R) C/C++ 최적화 컴파일러 버전 18.00.40629
Copyright (c) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_a3415.dir\Debug\\" /Fd"cmTC_a3415.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue "V:\03 git_repo\SQLiteCpp\build\CMakeFiles\feature_tests.cxx"
feature_tests.cxx
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_a3415.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_a3415.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"V:/03 git_repo/SQLiteCpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_a3415.lib" /MACHINE:X86 /SAFESEH /machine:X86 /debug cmTC_a3415.dir\Debug\feature_tests.obj
cmTC_a3415.vcxproj -> V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_a3415.exe
FinalizeBuildStatus:
"cmTC_a3415.dir\Debug\cmTC_a3415.tlog\unsuccessfulbuild" 파일을 삭제하고 있습니다.
"cmTC_a3415.dir\Debug\cmTC_a3415.tlog\cmTC_a3415.lastbuildstate"에 연결(touching)하고 있습니다.
"V:\03 git_repo\SQLiteCpp\build\CMakeFiles\CMakeTmp\cmTC_a3415.vcxproj" 프로젝트를 빌드했습니다(기본 대상).
빌드했습니다.
경고 0개
오류 0개
경과 시간: 00:00:04.54
Feature record: CXX_FEATURE:1cxx_alias_templates
Feature record: CXX_FEATURE:0cxx_alignas
Feature record: CXX_FEATURE:0cxx_alignof
Feature record: CXX_FEATURE:1cxx_auto_type
Feature record: CXX_FEATURE:0cxx_binary_literals
Feature record: CXX_FEATURE:1cxx_contextual_conversions
Feature record: CXX_FEATURE:1cxx_decltype
Feature record: CXX_FEATURE:0cxx_decltype_auto
Feature record: CXX_FEATURE:1cxx_default_function_template_args
Feature record: CXX_FEATURE:1cxx_defaulted_functions
Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers
Feature record: CXX_FEATURE:1cxx_delegating_constructors
Feature record: CXX_FEATURE:0cxx_deleted_functions
Feature record: CXX_FEATURE:0cxx_digit_separators
Feature record: CXX_FEATURE:1cxx_enum_forward_declarations
Feature record: CXX_FEATURE:1cxx_explicit_conversions
Feature record: CXX_FEATURE:1cxx_extended_friend_declarations
Feature record: CXX_FEATURE:1cxx_extern_templates
Feature record: CXX_FEATURE:1cxx_final
Feature record: CXX_FEATURE:0cxx_func_identifier
Feature record: CXX_FEATURE:1cxx_generalized_initializers
Feature record: CXX_FEATURE:0cxx_generic_lambdas
Feature record: CXX_FEATURE:0cxx_inheriting_constructors
Feature record: CXX_FEATURE:0cxx_inline_namespaces
Feature record: CXX_FEATURE:1cxx_lambdas
Feature record: CXX_FEATURE:0cxx_lambda_init_captures
Feature record: CXX_FEATURE:1cxx_local_type_template_args
Feature record: CXX_FEATURE:1cxx_long_long_type
Feature record: CXX_FEATURE:0cxx_noexcept
Feature record: CXX_FEATURE:0cxx_nonstatic_member_init
Feature record: CXX_FEATURE:1cxx_nullptr
Feature record: CXX_FEATURE:1cxx_override
Feature record: CXX_FEATURE:1cxx_range_for
Feature record: CXX_FEATURE:1cxx_raw_string_literals
Feature record: CXX_FEATURE:0cxx_reference_qualified_functions
Feature record: CXX_FEATURE:0cxx_return_type_deduction
Feature record: CXX_FEATURE:1cxx_right_angle_brackets
Feature record: CXX_FEATURE:1cxx_rvalue_references
Feature record: CXX_FEATURE:0cxx_sizeof_member
Feature record: CXX_FEATURE:1cxx_static_assert
Feature record: CXX_FEATURE:1cxx_strong_enums
Feature record: CXX_FEATURE:1cxx_template_template_parameters
Feature record: CXX_FEATURE:0cxx_thread_local
Feature record: CXX_FEATURE:1cxx_trailing_return_types
Feature record: CXX_FEATURE:0cxx_unicode_literals
Feature record: CXX_FEATURE:1cxx_uniform_initialization
Feature record: CXX_FEATURE:0cxx_unrestricted_unions
Feature record: CXX_FEATURE:0cxx_user_literals
Feature record: CXX_FEATURE:1cxx_variadic_macros
Feature record: CXX_FEATURE:1cxx_variadic_templates
error MSB6006: "cmd.exe" exited with code 1.
Here is the log message for build steps.
V:\03 git_repo\SQLiteCpp>build
V:\03 git_repo\SQLiteCpp>mkdir build
A subdirectory or file build already exists.
V:\03 git_repo\SQLiteCpp>cd build
V:\03 git_repo\SQLiteCpp\build>cmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_B
UILD_TESTS=ON .. -G "Visual Studio 12"
-- PYTHON_EXECUTABLE=C:/Anaconda3/python.exe
-- Could NOT find cppcheck
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning (dev) at CMakeLists.txt:221 (add_subdirectory):
The source directory
V:/03 git_repo/SQLiteCpp/googletest/CMakeLists.txt
does not contain a CMakeLists.txt file.
CMake does not support this case but it used to work accidentally and is
being allowed for compatibility.
Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run
"cmake --help-policy CMP0014" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: V:/03 git_repo/SQLiteCpp/build
V:\03 git_repo\SQLiteCpp\build>cmake --build .
Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.0]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2015-07-24 ?? 8:39:52.
Project "V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" on node 1 (default t
argets).
Project "V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (1) is building "V:
03 git_repo\SQLiteCpp\build\SQLiteCpp.vcxproj" (2) on node 1 (default targets).
Project "V:\03 git_repo\SQLiteCpp\build\SQLiteCpp.vcxproj" (2) is building "V:
03 git_repo\SQLiteCpp\build\ZERO_CHECK.vcxproj" (3) on node 1 (default targets)
.
InitializeBuildStatus:
Creating "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "
AlwaysCreate" was specified.
CustomBuild:
All outputs are up-to-date.
Checking Build System
CMake does not need to re-run because V:/03 git_repo/SQLiteCpp/build/CMakeFil
es/generate.stamp is up-to-date.
CMake does not need to re-run because V:/03 git_repo/SQLiteCpp/build/sqlite3/
CMakeFiles/generate.stamp is up-to-date.
CMake does not need to re-run because V:/03 git_repo/SQLiteCpp/build/googlete
st/CMakeFiles/generate.stamp is up-to-date.
FinalizeBuildStatus:
Deleting file "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
Touching "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "V:\03 git_repo\SQLiteCpp\build\ZERO_CHECK.vcxproj" (defa
ult targets).
InitializeBuildStatus:
Creating "SQLiteCpp.dir\Debug\SQLiteCpp.tlog\unsuccessfulbuild" because "Alwa
ysCreate" was specified.
CustomBuild:
All outputs are up-to-date.
ClCompile:
All outputs are up-to-date.
Lib:
All outputs are up-to-date.
SQLiteCpp.vcxproj -> V:\03 git_repo\SQLiteCpp\build\Debug\SQLiteCpp.lib
FinalizeBuildStatus:
Deleting file "SQLiteCpp.dir\Debug\SQLiteCpp.tlog\unsuccessfulbuild".
Touching "SQLiteCpp.dir\Debug\SQLiteCpp.tlog\SQLiteCpp.lastbuildstate".
Done Building Project "V:\03 git_repo\SQLiteCpp\build\SQLiteCpp.vcxproj" (defau
lt targets).
Project "V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (1) is building "V:
03 git_repo\SQLiteCpp\build\SQLiteCpp_cpplint.vcxproj" (4) on node 1 (default t
argets).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targe
ts(388,5): warning MSB8028: The intermediate directory (Win32\Debug\SQLiteCpp_c
pplint) contains files shared from another project (SQLiteCpp_cpplint.vcxproj,
SQLiteCpp_cpplint.vcxproj). This can lead to incorrect clean and rebuild beha
vior. [V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_cpplint.vcxproj]
InitializeBuildStatus:
Touching "Win32\Debug\SQLiteCpp_cpplint\SQLiteCp.87BFD408.tlog\unsuccessfulbu
ild".
CustomBuild:
Building Custom Rule V:/03 git_repo/SQLiteCpp/CMakeLists.txt
CMake does not need to re-run because V:\03 git_repo\SQLiteCpp\build\CMakeFil
es\generate.stamp is up-to-date.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targ
ets(170,5): error MSB6006: "cmd.exe" exited with code 1. [V:\03 git_repo\SQLite
Cpp\build\SQLiteCpp_cpplint.vcxproj]
Done Building Project "V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_cpplint.vcxproj
" (default targets) -- FAILED.
Project "V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (1) is building "V:
03 git_repo\SQLiteCpp\build\SQLiteCpp_example1.vcxproj" (5) on node 1 (default
targets).
Project "V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_example1.vcxproj" (5) is buil
ding "V:\03 git_repo\SQLiteCpp\build\sqlite3\sqlite3.vcxproj" (6) on node 1 (de
fault targets).
InitializeBuildStatus:
Creating "sqlite3.dir\Debug\sqlite3.tlog\unsuccessfulbuild" because "AlwaysCr
eate" was specified.
CustomBuild:
All outputs are up-to-date.
ClCompile:
All outputs are up-to-date.
Lib:
All outputs are up-to-date.
sqlite3.vcxproj -> V:\03 git_repo\SQLiteCpp\build\sqlite3\Debug\sqlite3.lib
FinalizeBuildStatus:
Deleting file "sqlite3.dir\Debug\sqlite3.tlog\unsuccessfulbuild".
Touching "sqlite3.dir\Debug\sqlite3.tlog\sqlite3.lastbuildstate".
Done Building Project "V:\03 git_repo\SQLiteCpp\build\sqlite3\sqlite3.vcxproj"
(default targets).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targe
ts(388,5): warning MSB8028: The intermediate directory (SQLiteCpp_example1.dir
Debug) contains files shared from another project (SQLiteCpp_example1.vcxproj,
SQLiteCpp_example1.vcxproj). This can lead to incorrect clean and rebuild beh
avior. [V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_example1.vcxproj]
InitializeBuildStatus:
Creating "SQLiteCpp_example1.dir\Debug\SQLiteCp.7BC30BB6.tlog\unsuccessfulbui
ld" because "AlwaysCreate" was specified.
CustomBuild:
All outputs are up-to-date.
ClCompile:
All outputs are up-to-date.
Link:
All outputs are up-to-date.
SQLiteCpp_example1.vcxproj -> V:\03 git_repo\SQLiteCpp\build\Debug\SQLiteCpp_
example1.exe
FinalizeBuildStatus:
Deleting file "SQLiteCpp_example1.dir\Debug\SQLiteCp.7BC30BB6.tlog\unsuccessf
ulbuild".
Touching "SQLiteCpp_example1.dir\Debug\SQLiteCp.7BC30BB6.tlog\SQLiteCpp_examp
le1.lastbuildstate".
Done Building Project "V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_example1.vcxpro
j" (default targets).
Project "V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (1) is building "V:
03 git_repo\SQLiteCpp\build\SQLiteCpp_tests.vcxproj" (7) on node 1 (default tar
gets).
InitializeBuildStatus:
Touching "SQLiteCpp_tests.dir\Debug\SQLiteCpp_tests.tlog\unsuccessfulbuild".
CustomBuild:
All outputs are up-to-date.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /I"V:\03
git_repo\SQLiteCpp\include" /I"V:\03 git_repo\SQLiteCpp\sqlite3" /I"V:\03 gi
t_repo\SQLiteCpp\googletest\include" /Zi /nologo /W3 /WX- /Od /Ob0 /Oy- /D WI
N32 /D _WINDOWS /D _DEBUG /D CRT_SECURE_NO_WARNINGS /D SQLITE_ENABLE_COLUMN
METADATA /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /EHsc /RTC1 /MTd /GS /Zc:w
char_t /Zc:forScope /GR /Fo"SQLiteCpp_tests.dir\Debug" /Fd"SQLiteCpp_tests.
dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:queue "V:\03 git_repo\SQL
iteCpp\tests\Column_test.cpp" "V:\03 git_repo\SQLiteCpp\tests\Database_test.c
pp" "V:\03 git_repo\SQLiteCpp\tests\Statement_test.cpp"
Column_test.cpp
V:\03 git_repo\SQLiteCpp\tests\Column_test.cpp(16): fatal error C1083: ?? ??? ?
? ????. 'gtest/gtest.h': No such file or directory [V:\03 git_repo\SQLiteCpp\b
uild\SQLiteCpp_tests.vcxproj]
Database_test.cpp
V:\03 git_repo\SQLiteCpp\tests\Database_test.cpp(14): fatal error C1083: ?? ???
? ? ????. 'gtest/gtest.h': No such file or directory [V:\03 git_repo\SQLiteCpp
\build\SQLiteCpp_tests.vcxproj]
Statement_test.cpp
V:\03 git_repo\SQLiteCpp\tests\Statement_test.cpp(15): fatal error C1083: ?? ??
? ? ? ????. 'gtest/gtest.h': No such file or directory [V:\03 git_repo\SQLiteCp
p\build\SQLiteCpp_tests.vcxproj]
??? ???? ????...
Done Building Project "V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_tests.vcxproj"
(default targets) -- FAILED.
Done Building Project "V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (defau
lt targets) -- FAILED.
Build FAILED.
"V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (default target) (1) ->
"V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_cpplint.vcxproj" (default target) (4)
->
(PrepareForBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.tar
gets(388,5): warning MSB8028: The intermediate directory (Win32\Debug\SQLiteCpp
_cpplint) contains files shared from another project (SQLiteCpp_cpplint.vcxpro
j, SQLiteCpp_cpplint.vcxproj). This can lead to incorrect clean and rebuild be
havior. [V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_cpplint.vcxproj]
"V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (default target) (1) ->
"V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_example1.vcxproj" (default target) (5
) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.tar
gets(388,5): warning MSB8028: The intermediate directory (SQLiteCpp_example1.di
r\Debug) contains files shared from another project (SQLiteCpp_example1.vcxpro
j, SQLiteCpp_example1.vcxproj). This can lead to incorrect clean and rebuild b
ehavior. [V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_example1.vcxproj]
"V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (default target) (1) ->
"V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_cpplint.vcxproj" (default target) (4)
->
(CustomBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.ta
rgets(170,5): error MSB6006: "cmd.exe" exited with code 1. [V:\03 git_repo\SQLi
teCpp\build\SQLiteCpp_cpplint.vcxproj]
"V:\03 git_repo\SQLiteCpp\build\ALL_BUILD.vcxproj" (default target) (1) ->
"V:\03 git_repo\SQLiteCpp\build\SQLiteCpp_tests.vcxproj" (default target) (7) -
(ClCompile target) ->
V:\03 git_repo\SQLiteCpp\tests\Column_test.cpp(16): fatal error C1083: ?? ???
? ? ????. 'gtest/gtest.h': No such file or directory [V:\03 git_repo\SQLiteCpp
\build\SQLiteCpp_tests.vcxproj]
V:\03 git_repo\SQLiteCpp\tests\Database_test.cpp(14): fatal error C1083: ?? ?
?? ? ? ????. 'gtest/gtest.h': No such file or directory [V:\03 git_repo\SQLiteC
pp\build\SQLiteCpp_tests.vcxproj]
V:\03 git_repo\SQLiteCpp\tests\Statement_test.cpp(15): fatal error C1083: ??
??? ? ? ????. 'gtest/gtest.h': No such file or directory [V:\03 git_repo\SQLite
Cpp\build\SQLiteCpp_tests.vcxproj]
2 Warning(s)
4 Error(s)
Time Elapsed 00:00:03.12
V:\03 git_repo\SQLiteCpp\build>ctest --output-on-failure
Test project V:/03 git_repo/SQLiteCpp/build
Start 1: UnitTests
Could not find executable SQLiteCpp_tests
Looked in the following places:
SQLiteCpp_tests
SQLiteCpp_tests.exe
Release/SQLiteCpp_tests
Release/SQLiteCpp_tests.exe
Debug/SQLiteCpp_tests
Debug/SQLiteCpp_tests.exe
MinSizeRel/SQLiteCpp_tests
MinSizeRel/SQLiteCpp_tests.exe
RelWithDebInfo/SQLiteCpp_tests
RelWithDebInfo/SQLiteCpp_tests.exe
Deployment/SQLiteCpp_tests
Deployment/SQLiteCpp_tests.exe
Development/SQLiteCpp_tests
Development/SQLiteCpp_tests.exe
Unable to find executable: SQLiteCpp_tests
1/2 Test #1: UnitTests ........................***Not Run 0.00 sec
Start 2: Example1Run
2/2 Test #2: Example1Run ...................... Passed 0.11 sec
50% tests passed, 1 tests failed out of 2
Total Test time (real) = 0.19 sec
The following tests FAILED:
1 - UnitTests (Not Run)
Errors while running CTest
V:\03 git_repo\SQLiteCpp\build>cd ..
V:\03 git_repo\SQLiteCpp>
When including SQLiteCpp im my cmake project I get undefined reference to __stack_chk_fail and
__stack_chk_guard in Database.cpp and Statements.cpp while building. I'm using mingw64 5.2 on Windows 8 64bit. Any help is appreciated even if it's a proper place to ask this question.Thanks
In gcc 5 SQLiteCpp fails to compile as gcc 5 has noexcept, but fails SQLiteCPP's detection.
Hi,
I'd like to retrieve my last inserted rowid with a method like the sqlite function sqlite3_last_insert_rowid(sqlite3*) does. Is there a method that do this?
Btw. Thank you for your great work
UPDATE: Im really sorry, I haven't noticed that the method Database::getLastInsertRowid is already implemented.
I want to use this library in my (Visual Studio) project, but i dont understand how to include it. Any help?
Switched to Windows to compile the app for Windows but I have some errors:
mingw32-make
:: warning: cppcheck: Cppcheck cannot find all the include files (use --check-co
nfig for details) [information/missingInclude]
[ 0%] Built target cppcheck
Scanning dependencies of target SQLiteCpp
[ 20%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Column.cpp.obj
G__~1.EXE: error: unrecognized command line option '-rdynamic'
src\CMakeFiles\SQLiteCpp.dir\build.make:56: recipe for target 'src/CMakeFiles/SQ
LiteCpp.dir/Column.cpp.obj' failed
mingw32-make[2]: *** [src/CMakeFiles/SQLiteCpp.dir/Column.cpp.obj] Error 1
CMakeFiles\Makefile2:147: recipe for target 'src/CMakeFiles/SQLiteCpp.dir/all' f
ailed
mingw32-make[1]: *** [src/CMakeFiles/SQLiteCpp.dir/all] Error 2
Makefile:84: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
Hello, how are you?
I would like to know how to build it using only the MinGW?
thx!
Hello. I was kind of shocked when I saw your wrapper does not support for UTF16 strings. I don't know why, but I through it supports all the features of sqlite.
From sqlite site: Support for both UTF-8 and UTF-16 text.
I understand sizeof(wchar_t) on Linux is 4 bytes will not be portability if you use it.. but really, I think there are another solutions(ex: if sizeof(wchar_t) != 2 -> shrink to fit or kind of own string class implementation with underlying int16_t or.. I don't know).
My problem is about working with files and no ASCII / UTF8 filenames, but UTF16. What should I do ? Do you mind if you add such a support or do I need to use the sqlite library directly ?
Thanks, Andrei.
Hi!
I tried to compile the SQLiteCpp on my nas, but it says something like this, when I try to build (make) it:
# cmake --build ./
Scanning dependencies of target SQLiteCpp
[ 16%] Building CXX object CMakeFiles/SQLiteCpp.dir/src/Column.cpp.o
[ 33%] Building CXX object CMakeFiles/SQLiteCpp.dir/src/Database.cpp.o
[ 50%] Building CXX object CMakeFiles/SQLiteCpp.dir/src/Statement.cpp.o
[ 66%] Building CXX object CMakeFiles/SQLiteCpp.dir/src/Transaction.cpp.o
[ 83%] Building CXX object CMakeFiles/SQLiteCpp.dir/src/Backup.cpp.o
Linking CXX static library libSQLiteCpp.a
[ 83%] Built target SQLiteCpp
Scanning dependencies of target SQLiteCpp_cpplint
CMakeFiles/SQLiteCpp_cpplint.dir/build.make:49: recipe for target 'CMakeFiles/SQLiteCpp_cpplint' failed
make[2]: *** [CMakeFiles/SQLiteCpp_cpplint] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/SQLiteCpp_cpplint.dir/all' failed
make[1]: *** [CMakeFiles/SQLiteCpp_cpplint.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
My nas has an old armv5tel based processor and an old kernel (2.6.31.8) but it works nice with same cmake based sources.
Thanks for UR answer!
Hi all,
Just thought I'd share these warnings that pop up when compiling with the Clang compiler (Apple LLVM version 7.0.0 (clang-700.0.72) on Mac OS X 10.11. They're related to Googletest and so I'm guessing they're benign. Just thought it would be good to share this for the record.
In file included from SQLiteCpp/googletest/include/gtest/gtest.h:58:
SQLiteCpp/googletest/include/gtest/internal/gtest-internal.h:1029:68: warning: commas at the end of enumerator
lists are a C++11 extension [-Wc++11-extensions]
Element, GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>::value,
^
In file included from SQLiteCpp/googletest/src/gtest-all.cc:42:
SQLiteCpp/googletest/src/gtest.cc:374:12: warning: missing field 'owner_' initializer
[-Wmissing-field-initializers]
GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex);
^
SQLiteCpp/googletest/include/gtest/internal/gtest-port.h:1905:80: note: expanded from macro
'GTEST_DEFINE_STATIC_MUTEX_'
::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
^
2 warnings generated.
In file included from SQLiteCpp/googletest/include/gtest/gtest.h:58:
SQLiteCpp/googletest/include/gtest/internal/gtest-internal.h:1029:68: warning: commas at the end of enumerator
lists are a C++11 extension [-Wc++11-extensions]
Element, GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>::value,
^
1 warning generated.
In file included from SQLiteCpp/googletest/include/gtest/gtest.h:58:
SQLiteCpp/googletest/include/gtest/internal/gtest-internal.h:1029:68: warning: commas at the end of enumerator
lists are a C++11 extension [-Wc++11-extensions]
Element, GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>::value,
^
1 warning generated.
In file included from SQLiteCpp/googletest/include/gtest/gtest.h:58:
SQLiteCpp/googletest/include/gtest/internal/gtest-internal.h:1029:68: warning: commas at the end of enumerator
lists are a C++11 extension [-Wc++11-extensions]
Element, GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>::value,
^
1 warning generated.
Kind regards,
Kartik
Introduced here: b0e9104
The following states that "Visual Studio 2012 and above have noexcept", however they do not.
"In the ISO C++11 Standard, the noexcept operator is introduced, but support for this feature is not yet present in Visual C++." (http://msdn.microsoft.com/en-us/library/wfa0edys(v=vs.120).aspx)
// Detect whether the compiler supports C++11 noexcept exception specifications.
#if (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 7 ) && defined(__GXX_EXPERIMENTAL_CXX0X__))
// GCC 4.7 and following have noexcept
#elif defined(__clang__) && __has_feature(cxx_noexcept)
// Clang 3.0 and above have noexcept
#elif defined(_MSC_VER) && (_MSC_VER >= 1700)
// Visual Studio 2012 and above have noexcept
#else
#define noexcept throw()
#endif
When I make the Makefile generated by cmake I get those errors:
Scanning dependencies of target SQLiteCpp
[ 20%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Column.cpp.o
[ 40%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Database.cpp.o
[ 60%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Statement.cpp.o
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp: In member function ‘void SQLite::Statement::bind(int, const string&)’:
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp:69:79: warning: conversion to ‘int’ from ‘std::basic_string::size_type {aka long unsigned int}’ may alter its value [-Wconversion]
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp: In member function ‘void SQLite::Statement::bind(const char_, const string&)’:
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp:123:80: warning: conversion to ‘int’ from ‘std::basic_string::size_type {aka long unsigned int}’ may alter its value [-Wconversion]
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp: In constructor ‘SQLite::Statement::Ptr::Ptr(sqlite3_, std::string&)’:
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp:272:72: warning: conversion to ‘int’ from ‘std::basic_string::size_type {aka long unsigned int}’ may alter its value [-Wconversion]
[ 80%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Transaction.cpp.o
Linking CXX static library libSQLiteCpp.a
[ 80%] Built target SQLiteCpp
Scanning dependencies of target example1
[100%] Building CXX object CMakeFiles/example1.dir/examples/example1/main.cpp.o
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/examples/example1/main.cpp: In function ‘int main()’:
/home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/examples/example1/main.cpp:302:37: warning: conversion to ‘int’ from ‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
Linking CXX executable example1
src/libSQLiteCpp.a(Column.cpp.o): In function SQLite::Column::getName() const': Column.cpp:(.text+0x163): undefined reference to
sqlite3_column_origin_name'
collect2: error: ld returned 1 exit status
make[2]: *** [example1] Error 1
make[1]: *** [CMakeFiles/example1.dir/all] Error 2
make: *** [all] Error 2
Hello, Is there a command like executemany() for dealing with multiple inserts?
Hi Sébastien,
After spending a lot of time looking through the code, I realised that the problems I was having with the newest code is due to the default options switched on in the main CMakeLists.txt file.
The options that caused me problems are:
SQLITE_ENABLE_COLUMN_METADATA
: this is switched on by default, however under Mac OS X, the native SQLite library is not built with column name support. I tried building a new version using Homebrew but couldn't for the life of me get SQLiteCpp to link to it.SQLITE_ENABLE_ASSERT_HANDLER
: this is also switched on by default, however from what I can see, it will always result in linking problems unless the user provides an implementation of assertion_failed()
.In the first case, it might still be alright to leave the option on, however if a large number of users have pre-built versions of SQLite installed, this might cause issues.
In the second case, it seems like default case will cause problems out of the box for a new user who has no custom implementation of assertion_failed()
.
After switching both these options off, I could link to the SQLiteCpp static library without any problems.
Would it be an idea to switch both these options off by default? Feels like the safer option in general.
Regards,
Kartik
I downloaded the new sources and when try to make I got this:
Scanning dependencies of target cppcheck
make[2]: cppcheck: Command not found
CMakeFiles/cppcheck.dir/build.make:52: recipe for target 'CMakeFiles/cppcheck' failed
make[2]: *** [CMakeFiles/cppcheck] Error 127
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/cppcheck.dir/all' failed
make[1]: *** [CMakeFiles/cppcheck.dir/all] Error 2
Makefile:85: recipe for target 'all' failed
make: *** [all] Error 2
In the TODO.txt, it is claimed the library isn't thread safe, but is there any reason for that to be the case? "Threadsafe" in the context of SQLite means you can open multiple connections in different threads, not that you can use a single connection in multiple threads, so I don't see any reason why this shouldn't be threadsafe if the underlying SQLite implementation is threadsafe.
Hi,
In my application, I need to deal a lot with strings (big strings) and blob (big blob) data.
What is the current support status for these datatype in SQLiteCpp ?
Are the supported properly ? Is SQLITE_STATIC binding supported ?
Thanks.
Hi SRombauts,
Would it be helpful if we add sqlite error code info into SQLite::Exception?
RT
Add git submodule init /update to README
Explain common errors
Point on build.sh and batch scripts as examples.
If Column.h is included in a file compiled in clang in c++11 mode with -Weverything set it generates a warning that auto-generating copy constructors when a destructor has been defined is depreciated.
Warning text:
/home/tycho/MCServer/src/../lib/SQLiteCpp/include/SQLiteCpp/Column.h:54:13: warning:
definition of implicit copy constructor for 'Column' is deprecated because
it has a user-declared destructor [-Wdeprecated]
virtual ~Column() noexcept; // nothrow
^
/home/tycho/MCServer/src/../lib/SQLiteCpp/include/SQLiteCpp/Database.h:177:16: note:
implicit copy constructor for 'Column' first required here
return execAndGet(aQuery.c_str());
^
Hi, tanks for your work.
Is there a way to get column by name instead of index.
Or could you add this to your todo list.
Hi,
Firstly, nice looking library! Forked it and created a config file for CMake to play around with deploying it in some of my research projects.
One thing I noticed is that I can't seem to spot any unit tests that ship with the code, and I believe you've listed that as one of the goals for the library in the readme file.
Do you happen to have any unit tests written that demonstrate how the code implements RAII fully?
Thanks,
Kartik
int ret = sqlite3_finalize(mpStmt);
// Never throw an exception in a destructor
//std::cout << sqlite3_errmsg(mpSQLite) << std::endl;
SQLITE_CPP_ASSERT (SQLITE_OK == ret);
I encounter ret is 11, then trigger this assert.
Hi,
there is a problem in the Database destructor in combination with SQLITECPP_ASSERT.
At the Database destructor, sqlite3_close is called and the return value is asserted to be SQLITE_OK. The message argument for SQLITECPP_ASSERT is the character pointer returned by sqlite3_errmsg called with the pointer to the database which is invalid in case of a successful sqlite3_close. This results in reading memory after it is freed.
It would be better to have getColumn<T>(n)
syntax, because we need to set the type of the return value anyway. Writing static_cast<T>(query.getColumn(n))
is way too verbose. You can achieve that by partial specialization of some class with static methods.
Exposing the sqlite db handle pointer would be helpful to integrate with other libraries. For example, the spatialite initialization function takes the pointer as an argument.
Hi SRombauts,
It seems helpful to add configuration options in Database's constructor, isn't it?
Please see http://www.sqlite.org/c3ref/c_config_getmalloc.html for details.
I started to play with SQLiteCpp. I have a simple program:
#include "SQLiteCpp/SQLiteCpp.h"
int main (int argc, char *argv[])
{
SQLite::Database db("mydb.db", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE);
SQLite::Statement query(db, "INSERT INTO categories (title) VALUES (?)");
query.bind(1, "example");
query.exec();
return 0;
}
mydb.db and categories table exists with id and title cols. When I run this program with valgrind I am getting this error message:
==3857== Memcheck, a memory error detector
==3857== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==3857== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==3857== Command: ./a.out
==3857==
==3857== Invalid read of size 4
==3857== at 0x4E75CB0: sqlite3SafetyCheckSickOrOk (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==3857== by 0x4E80A72: sqlite3_errmsg (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==3857== by 0x4021DF: SQLite::Database::~Database() (Database.cpp:77)
==3857== by 0x401CD0: main (in /tmp/a.out)
==3857== Address 0x60e91d4 is 100 bytes inside a block of size 856 free'd
==3857== at 0x4C29E90: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3857== by 0x4E4DFED: sqlite3_free (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==3857== by 0x4E87E14: sqlite3Close (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==3857== by 0x4021C6: SQLite::Database::~Database() (Database.cpp:75)
==3857== by 0x401CD0: main (in /tmp/a.out)
==3857==
==3857==
==3857== HEAP SUMMARY:
==3857== in use at exit: 0 bytes in 0 blocks
==3857== total heap usage: 264 allocs, 264 frees, 126,022 bytes allocated
==3857==
==3857== All heap blocks were freed -- no leaks are possible
==3857==
==3857== For counts of detected and suppressed errors, rerun with: -v
==3857== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Hi,
I plan to use SQLiteCpp in my project (windows).
Is there any reason to not build SQLiteCpp as a DLL ?
I didn't see any DLL import / export directives, and I prefer to use a DLL due to my project's architecture.
If you want, I can add the necessary macros.
I have seen that you can access now from SQLite::Statement the last status. Why isn't there a method in SQLite::Database to get the last status / error code (,either)? This is useful in case you want to detect the reason in case an exception is raised and the exception handler has no access to the statement.
BTW: There is a method to get the last error message but not the status.
you state that:
sqlite3pp: uses boost, but never updated since initial publication in may 2012, MIT License
which is not true, see its github page
What about Unicode support?
We got "database is locked" exceptions sometimes when multiple threads insert into the same table in a database. We are not sharing the SQLite::Database object among threads. Each thread will create its own SQLite::Database object. The Multi-thread mode is already used. Basically our code is like:
void insertToDb(int value)
{
SQLite::Database db(_dbPath, SQLITE_OPEN_READWRITE|SQLITE_OPEN_NOMUTEX);
SQLite::Statement query(db,
"INSERT INTO record"
"(a) "
"VALUES (?,");
query.bind(1, value);
query.exec();
}
Each thread will call this method to insert into the database. Autoincrement Id is used in the table.
I'd like to be able to to enable module support.
In order to do this, I need to invoke this line from SQL:
SELECT load_extension('filename');
or
sqlite3_load_extension()
however this will fail until I have...
int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
So, how best to add this in? I'm thinking I could either create a Utility.h with an equivalent class in the include directory, make it a friend of Database (like Statement.h) and get access to the db connection that way.
Alternatives which don't seem so appealing are: add database connection ID accessor method (breaking the encapsulation but allowing anyone to directly use the numerous other missing calls), or add methods directly into the Database class (most of which will never be used by the majority of users). Opinions? Ideally I'd like to do this in a way that allows me to contribute back the changes.
Hi,
i would propose changing the API to use std::string
in place of const char*
. It would still be possible to call all functions with const char*
(which is automatically converted to std::string
), so there will be no loss of backwards compatibility. But it would present a better, proper C++ interface. Right now I have to do the .c_str()
conversion a lot while using this wrapper.
I would volunteer to adapt the library to use std::string
. Please let me know though if you would accept such a pull request before I do all the work.
Bests,
Patrick
Hi SRombauts,
Thanks for providing this good wrapper. I find I need the backup of DB file in my application. Do you think it is necessary to add this functionality? If so, I can do some help.
After maked with/without cppcheck a get those from my app:
/home/aykelith/Documents/Programare/Libs/SQLiteCpp/src/libSQLiteCpp.a(Database.cpp.o): In function SQLite::Database::~Database()': Database.cpp:(.text+0x22f): undefined reference to
SQLite::assertion_failed(char const_, long, char const_, char const_, char const_)'
/home/aykelith/Documents/Programare/Libs/SQLiteCpp/src/libSQLiteCpp.a(Statement.cpp.o): In function SQLite::Statement::Ptr::~Ptr()': Statement.cpp:(.text+0x16eb): undefined reference to
SQLite::assertion_failed(char const_, long, char const_, char const_, char const_)'
/home/aykelith/Documents/Programare/Libs/SQLiteCpp/src/libSQLiteCpp.a(Transaction.cpp.o): In function SQLite::Transaction::~Transaction()': Transaction.cpp:(.text+0x154): undefined reference to
SQLite::assertion_failed(char const_, long, char const_, char const_, char const_)'
Do I have to declare SQLite::Database db("test.db") every time I want to use database? Is there any static function which gets default database when I construct it first time when program starts. Sorry if I'm not precise enaugh.After several minutes of thinking I suppose I can write it myself :). Please consider this post closed.
I'm receiving this error, using g++ (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 4.9.2
/mingw492/SQLiteCpp/sqlite3/libsqlite3.a(sqlite3.c.obj):sqlite3.c:(.text+0x7a8f4): undefined reference to
__stack_chk_guard' /mingw492/SQLiteCpp/sqlite3/libsqlite3.a(sqlite3.c.obj):sqlite3.c:(.text+0x7a8fb): undefined reference to
__stack_chk_fail'
The database constructor does not return the good error message with the following code :
SQLite::Database* db = new SQLite::Database(filename, SQLITE_OPEN_CREATE);
In my case it returned an out of memory message.
Can be fixed by using sqlite3_errstr()
instead of sqlite3_errmsg()
.
Hi SRombauts,
I think it helpful to add log for sql statements, isn't it?
I need data in table as UTF-32/UTF-16 and need to use wstring. How to do that becuase get error when try to retrieve as wstring? You will be implement this feature?
I try to compile Cuberite with the ndk, however, as i say "compile everything in lib and src directory",
the compilation of the example1 fails. here the error message.
In file included from lib/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h:22:0,
from cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:18:
lib/SQLiteCpp/include/SQLiteCpp/Exception.h:25:1: error: expected class-name before '{' token
{
^
lib/SQLiteCpp/include/SQLiteCpp/Exception.h: In constructor 'SQLite::Exception::Exception(const string&)':
lib/SQLiteCpp/include/SQLiteCpp/Exception.h:33:27: error: expected class-name before '(' token
std::runtime_error(aErrorMessage)
^
lib/SQLiteCpp/include/SQLiteCpp/Exception.h:33:27: error: expected '{' before '(' token
In file included from lib/SQLiteCpp/include/SQLiteCpp/Column.h:15:0,
from lib/SQLiteCpp/include/SQLiteCpp/Database.h:15,
from lib/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h:23,
from cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:18:
lib/SQLiteCpp/include/SQLiteCpp/Statement.h: In member function 'void SQLite::Statement::check(int) const':
lib/SQLiteCpp/include/SQLiteCpp/Statement.h:460:61: error: exception handling disabled, use -fexceptions to enable
throw SQLite::Exception(sqlite3_errmsg(mStmtPtr));
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp: In function 'int main()':
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:107:46: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:206:46: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:224:46: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:243:46: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:283:46: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:314:50: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:337:50: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:351:46: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:407:24: warning: unused variable 'sizew' [-Wunused-variable]
size_t sizew = fwrite(blob, 1, size, fp);
^
cuberite-android/jni/lib/SQLiteCpp/examples/example1/main.cpp:420:46: error: 'e' was not declared in this scope
std::cout << "SQLite exception: " << e.what() << std::endl;
^
android-ndk-r11b/build/core/build-binary.mk:462: recipe for target 'cuberite-android/obj/local/armeabi/objs/Cuberite/lib/SQLiteCpp/examples/example1/main.o' failed
make: *** [cuberite-android/obj/local/armeabi/objs/Cuberite/lib/SQLiteCpp/examples/example1/main.o] Error 1
Hi,
I just wanted to question the use of the assert in the Statement::Ptr destructor. It seems to me that there are some circumstances where the sqlite3_finalize can return an error that is "normal" behaviour.
For example. A statement that fails because it does an INSERT that violates a UNIQUE constraint. This error gets handled by the exception thrown by executeStep, but then the destructor generates an assert which can't be handled. (The documentation for sqlite3_finalize says If the most recent evaluation of statement S failed, then sqlite3_finalize(S) returns the appropriate error code or extended error code.)
I have added my own assertion_failed function, but it would be nice if the statement knew what the last error was and only called the assert if finalize returned a different error.
Any thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.