I think you need to change your last compilation command line to this:

gcc -shared -Wl,-soname,virtcsv.so -o virtcsv.so -O2 -L/opt/local/lib
-lsqlite3 -liconv virtual_csv.o csvfile.o ext_init.o


Pavel

On Tue, Oct 6, 2009 at 6:16 AM, Emyr Thomas <emyr.tho...@gmail.com> wrote:
> On Oct 6, 10:52 am, Dan Kennedy <danielk1...@gmail.com> wrote:
>> You have the most recent version installed. But perhaps the pre-
>> processor
>> is finding an older sqlite3.h. Try adding -I/usr/local/include to the
>> gcc command.
>
> Thanks Dan. Macports puts things in /opt/local, so I added -I/usr/
> local/include and -L/opt/local/lib to the make file. It gets further,
> but now I get the following error:
>
> macbook:csvfile emyr$ make
> gcc -c -o virtual_csv.o -s -O2 -Wall -Wextra -I/opt/local/include
> virtual_csv.c
> gcc -c -o csvfile.o -s -O2 -Wall -Wextra -I/opt/local/include
> csvfile.c
> gcc -c -o ext_init.o -s -O2 -Wall -Wextra -I/opt/local/include
> ext_init.c
> gcc -shared -o virtcsv.so -O2 -L/opt/local/lib virtual_csv.o csvfile.o
> ext_init.o
> Undefined symbols:
>  "_libiconv_open", referenced from:
>      _csv_connect in virtual_csv.o
>  "_main", referenced from:
>      start in crt1.10.5.o
>  "_libiconv_close", referenced from:
>      _csv_disconnect in virtual_csv.o
>  "_sqlite3_result_null", referenced from:
>      _csv_column in virtual_csv.o
>  "_sqlite3_result_text", referenced from:
>      _csv_column in virtual_csv.o
>  "_sqlite3_declare_vtab", referenced from:
>      _csv_connect in virtual_csv.o
>  "_sqlite3_create_module", referenced from:
>      _sq3_register_virtual_csv in virtual_csv.o
>  "_libiconv", referenced from:
>      _csv_column in virtual_csv.o
>  "_sqlite3_mprintf", referenced from:
>      _csv_connect in virtual_csv.o
>      _csv_connect in virtual_csv.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [virtcsv.so] Error 1
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to