![]() Use ".open FILENAME" to reopen on a persistent database. sqlite3Ĭonnected to a transient in-memory database. (Oooops - we need to link in some external clang -o sqlite3 sqlite3.o shell.o -ldl. Sqlite3.c:(.text+0x5859f): undefined reference to `pthread_create'Ĭlang: error: linker command failed with exit code 1 (use -v to see invocation) usr/bin/ld: sqlite3.o: in function `sqlite3ThreadCreate': Sqlite3.c:(.text+0x37a0c): undefined reference to `pthread_join' usr/bin/ld: sqlite3.o: in function `sqlite3ThreadJoin': Sqlite3.c:(.text+0x1bb81): undefined reference to `pthread_mutex_trylock' usr/bin/ld: sqlite3.o: in function `pthreadMutexTry': usr/bin/ld: sqlite3.c:(.text+0x1baba): undefined reference to `pthread_mutexattr_destroy' usr/bin/ld: sqlite3.c:(.text+0x1ba9e): undefined reference to `pthread_mutexattr_settype' Sqlite3.c:(.text+0x1ba8d): undefined reference to `pthread_mutexattr_init' usr/bin/ld: sqlite3.o: in function `pthreadMutexAlloc': Sqlite3.c:(.text+0圆6f5): undefined reference to `dlclose' usr/bin/ld: sqlite3.o: in function `unixDlClose': Sqlite3.c:(.text+0圆6aa): undefined reference to `dlsym' usr/bin/ld: sqlite3.o: in function `unixDlSym': Sqlite3.c:(.text+0圆659): undefined reference to `dlerror' usr/bin/ld: sqlite3.o: in function `unixDlError': Sqlite3.c:(.text+0圆62a): undefined reference to `dlopen' usr/bin/ld: sqlite3.o: in function `unixDlOpen': rw-rw-r- 1 stephan stephan 595850 Nov 27 16:05 clang -c clang -c clang -o sqlite3 sqlite3.o shell.o On my OS that looks something like: ls -laĭrwxrwxr-x 2 stephan stephan 4096 Nov 27 16:05. If you're trying to build the shell, you'll have further steps to take, but someone familiar with the oddities of your platform will need to suggest what they are. You end up with an object file (the whole sqlite3 library) which you can then link together with your application's other object files. ![]() The -o flag tells it the output file name. The -c flag tells it to compile but not link. Though i don't know exactly what the conventions are on your OS, that generally looks something like:Ĭlang -arch arm64 -arch x86_64 -c -o sqlite3.o sqlite3.c It's intended to be built as an object file or a library. Undefined symbols for architecture arm64:īecause you're trying to compile the amalgamation as a standalone executable, which it is not. Struct _ht *pEntry, /* The entry into which pNew is inserted */įatal error: too many errors emitted, stopping now ![]() ![]() Sqlite3.c:33835:10: note: forward declaration of '_ht' (omitted, can post full output if helpful) Sqlite3.c:27359:11: error: assigning to 'sqlite3_mutex *' from incompatible type 'void *' Sqlite3.c:23315:11: warning: conversion from string literal to 'char *' is deprecated Sqlite3.c:14130:20: note: previous definition is here SQLITE_PRIVATE u32 sqlite3WhereTrace = 0 Sqlite3.c:21601:20: error: redefinition of 'sqlite3WhereTrace' Seems very close, like I'm just missing the right compiler flags.? Any thoughts? clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated Managed to get as far as the output below. Looking at building a universal binary for macOS Intel & Apple Silicon.ĭownloaded the sqlite-amalgamation-3370000 and used:Ĭlang++ -arch arm64 -arch x86_64 -o sqlite_build sqlite3.c
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |