This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (DbConnection connection = new SQLiteConnection("Data Source=" + database)) { | |
connection.Open(); // load the extension | |
using (DbCommand command = connection.CreateCommand()) { | |
//Load the libspatialite library extension - *.dll on windows, *.a on iOS | |
command.CommandText = "SELECT load_extension('libspatialite-2.dll');"; | |
command.ExecuteNonQuery(); // Run queries here | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//'using' System.Data.SQLite; | |
using (DbConnection connection = new SQLiteConnection("Data Source=" + database)) { | |
connection.Open(); // load the extension | |
using (DbCommand command = connection.CreateCommand()) { | |
//Load the libspatialite library extension - *.dll on windows, *.a on iOS | |
command.CommandText = "SELECT load_extension('libspatialite-2.dll');"; | |
command.ExecuteNonQuery(); // Run queries here | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//'using' System.Data.SQLite | |
public void SQLiteTest() | |
{ | |
string cnString = @"Data Source=C:\Working\whodatashapefiles\whodata.db3"; | |
using (SQLiteConnection conn = new SQLiteConnection(cnString)) | |
{ | |
conn.Open(); | |
using (SQLiteCommand cmd = conn.CreateCommand()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From http://stackoverflow.com/questions/1432540/creating-directory-hard-links-in-macos-x | |
You can use the following program to create a hard link to a directory: | |
#include <unistd.h> | |
#include <stdio.h> | |
int main(int argc, char* argv[]) { | |
if (argc != 3) { | |
fprintf(stderr,"Use: hlink <src_dir> <target_dir>\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: http://groups.google.com/group/spatialite-users/browse_thread/thread/f3b5941da7eded8d | |
[I have] SpatiaLite running on the iPhone (device + simulator) and GEOS | |
for the geometries model etc. as static libraries. I can not directly | |
give you the library (or libraries), but you can make it (or them) | |
yourself. There are just a few things you need to be aware of before | |
trying to add the database extension to the phone. | |
The native SQLite version is old, for instance, the function names | |
used by SpatiaLite do not work with that particular version. I myself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQLITE_EXTERN const char sqlite3_version[]; | |
const char *sqlite3_libversion(void); | |
const char *sqlite3_sourceid(void); | |
int sqlite3_libversion_number(void); | |
These interfaces provide the same information as the SQLITE_VERSION, SQLITE_VERSION_NUMBER, and SQLITE_SOURCE_ID C preprocessor macros but are associated with the library instead of the header file. Cautious programmers might include assert() statements in their application to verify that values returned by these interfaces match the macros in the header, and thus insure that the application is compiled with matching library and header files. | |
assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); | |
assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 ); | |
assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cmakelists.txt | |
cmake_minimum_required ( VERSION 2.6 FATAL_ERROR ) | |
project ( sqlite3 C ) | |
SET( CMAKE_INSTALL_PREFIX "f:/doof" ) | |
set ( SOURCES sqlite3.c ) | |
set ( HEADERS sqlite3.h ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Found at http://gitorious.org/~akeru/tagaini-jisho/akeru-tagaini-jisho | |
# The project name decides the naming pattern of many things - choose it according | |
# to the standard of the platform we run on. | |
if(APPLE) | |
project("Tagaini Jisho") | |
else(APPLE) | |
project("tagainijisho") | |
endif(APPLE) | |
# Set the program name to be the same as the project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
cmake_policy(SET CMP0015 NEW) | |
cmake_policy(SET CMP0016 NEW) | |
project(test) | |
set(NAME test) | |
file(GLOB headers *.h) | |
file(GLOB sources *.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
cmake_policy(SET CMP0015 NEW) | |
cmake_policy(SET CMP0016 NEW) | |
project(test) | |
set(NAME test) | |
file(GLOB headers *.h) | |
file(GLOB sources *.cpp) |