Re: loading extension csv.c

Richard Hipp <[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <CALwJ=MxejpBfSbbNNa3gjq6y4xxAHmo5OsFhPRXPmkuZvsKrrg@mail.gmail.com>
On 2/6/20, chiahui chen <[email protected]> wrote:
> Hi,
>
> After few attempts to load csv extension, (already tried
>
>     gcc -arch x86_64 -g -fPIC -dynamiclib csv.c -o csv.dylib
>
> and
>
>     gcc  -g -fPIC -dynamiclib csv.c -o csv.dylib
> )
> Mac terminal returns errors as followings:

I don't know what is causing your errors.  But I can show you what
works for me, on a Mac:

(1) Unpack the SQLite source-code tarball for version 3.31.1

(2) Run:  ./configure && make

(3) Run:  gcc -g -I. -fPIC -dynamiclib ext/misc/csv.c -o csv.dylib

(4) Run: ./sqlite3

(5) Within the SQLite command-line shell, do:  .load ./csv

I suspect that the -I. is the option that you need, so that the build
will pick up a proper sqlite3ext.h file, and not whatever sqlite3ext.h
file that Apple has installed.  But that is just my guess.

-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.