Git Product home page Git Product logo

sqlite-amalgamation's Issues

sqlite-almagamation with embedded python3

This is more a question than an issue.

Python3 can be embedded in a C/C++ code and so forth can execute python3 code which use sqlite3.

In case we have a C/C++ code using SQLite3-almagamation and at the same time we have python3 calling SQLite via the shared library is the code safe ?

In other words don't we have a risk of conflict between the 2 same code ?

shell_app build error in ubuntu20

[cmake] -- sqlite-amalgamation-3.38.2 configure success
[cmake] [1/5] Building C object CMakeFiles/shell_app.dir/shell.c.o
[cmake] [2/5] Building C object CMakeFiles/SQLite3.dir/sqlite3.c.o
[cmake] [3/5] Linking C static library libsqlite3.a
[cmake] [4/5] Linking C executable sqlite3
[cmake] FAILED: sqlite3
[cmake] : && /usr/bin/cc -O3 -DNDEBUG CMakeFiles/shell_app.dir/shell.c.o -o sqlite3 libsqlite3.a -lpthread -ldl && cd /home/ubuntu/Documents/sqlite-amalgamation-3.38.2/build && /usr/bin/strip sqlite3
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o): in function logFunc': [cmake] sqlite3.c:(.text+0x196ed): undefined reference to log'
[cmake] /usr/bin/ld: sqlite3.c:(.text+0x1971d): undefined reference to log' [cmake] /usr/bin/ld: sqlite3.c:(.text+0x19781): undefined reference to log'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1370): undefined reference to trunc' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1520): undefined reference to exp'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1568): undefined reference to pow' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x15b0): undefined reference to pow'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x15f8): undefined reference to fmod' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1640): undefined reference to acos'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1688): undefined reference to asin' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x16d0): undefined reference to atan'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1718): undefined reference to atan2' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1760): undefined reference to cos'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x17a8): undefined reference to sin' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x17f0): undefined reference to tan'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1838): undefined reference to cosh' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1880): undefined reference to sinh'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x18c8): undefined reference to tanh' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1910): undefined reference to acosh'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x1958): undefined reference to asinh' [cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x19a0): undefined reference to atanh'
[cmake] /usr/bin/ld: libsqlite3.a(sqlite3.c.o):(.data.rel+0x19e8): undefined reference to `sqrt'
[cmake] collect2: error: ld returned 1 exit status
[cmake] ninja: build stopped: subcommand failed.
[cmake] -- Configuring incomplete, errors occurred!

fd4f85218e7c46289d38d6fc154fe0d6

need add -lm in target_link_libraries function.
if(UNIX)
target_link_libraries(shell_app PRIVATE -lm)
endif()

"Could NOT find SQLite3" error when building project depending on sqlite

Hi Amir,

First of all thank you for your project, it's great to be able to use sqlite as a regular CMake project.

However, I had problems using it. I hope you are able to answer my few questions, as it could be useful for others.

I have built and installed the sqlite-amalgamation project.

To integrate the sqlite3 library to my project, I have used the way recommended in https://github.com/azadkuh/sqlite-amalgamation/blob/master/README.md:

find_package(Sqlite3)
target_link_libraries(myProjectName sqlite3::sqlite3)

Unfortunately, I have an error message when trying to build my project with cmake:

-- Could NOT find SQLite3 (missing: SQLite3_INCLUDE_DIR SQLite3_LIBRARY)

I am using CMake 3.15.4. I have seen that it contains a share\cmake-3.15\Modules\FindSQLite3.cmake file.

Is your project intended to be found with it?

I supposed those two variables SQLite3_INCLUDE_DIR and SQLite3_LIBRARY are hints for CMake's find_package to find the include dir and library file. If so, it should be mentionned in the README.md that the user needs to pass those to cmake.

Another question, why do I have to provide the sqlite library file path ? Wouldn't I have to provide the library directory instead?

Last question, once I have provided both, I have to do #include sqlite3.h instead of #include sqlite3/sqlite3.h. Is it normal?

cl : Command line warning D9025 : overriding '/MDd' with '/MTd'

Hi,

when using your cmake there is a problem with Debug version

Following command

cmake .. -G %Platform% -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=%LIB_DEST%

caused that this C_FLAGS are generated (flags.make file)

# CMAKE generated file: DO NOT EDIT!
# Generated by "NMake Makefiles" Generator, CMake Version 3.7

# compile C with C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
C_FLAGS = /DWIN32 /D_WINDOWS /W3 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -MTd  
C_DEFINES = 
C_INCLUDES = 

As you can see, there is /MDd together with -MTd. This is problem only with Debug, release is correctly configured to use only one flag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.