1

I am very new to SpatiaLite.

I am working on a large Visual Studio C++ project that already supports SQLite, and I am trying to add SpatiaLite capabilities to it. After reading the documentation and trying different approaches I am still not sure how to approach this.

The main C++ project loads a separate SQLite Visual Studio project in order to use database functions. In this SQLite Visual Studio project, we have SQLite headers, DLLs, and LIBs. We use the linker to access them from our main C++ project.

  1. Do you think it is viable to try to add the SpatiaLite extension to the SQLite Visual Studio project? I am not sure we are approaching it correctly. When trying to simply add header files + spatialite.c, and using OMIT_ICONV, OMIT_GEOS, OMIT_PROJ, OMIT_FREEXL in the preprocessor for building, it has many linker problems. For example:
    1>spatialite.obj : error LNK2019: unresolved external symbol _gaiaDoubleQuotedSql referenced in function _checkSpatialMetaData_ex

What are the minimal dependencies needed, are we missing files?

  1. Is there a purpose of building SpatiaLite in MinGW if our main C++ project is built and run from Visual Studio?

I've tried to build SpatiaLite with MinGW 64 bit instructions, but failed.

On libjpeg step, ran into this error when trying to do the line: cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64/local ..

-- The ASM_NASM compiler identification is unknown -- Didn't find assembler CMake Error at simd/CMakeLists.txt:41 (enable_language): No CMAKE_ASM_NASM_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment variable "ASM_NASM" or the CMake cache entry CMAKE_ASM_NASM_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.


I tried to skip down to libproj and libgeos, to just build spatialite, and libgeos on "make" step had failures.

error lines: libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../include -I../../../include /geos -I../../../include -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffl oat-store -03 -MT IndexedPointInAreaLocator.lo -MD -MP -MF .deps/IndexedPointInA reaLocator.Tpo -c IndexedPointInAreaLocator.cpp g++.exe: error: unrecognized command line option '-03'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.