Re: [sqlite] makefile for c

2012-01-24 Thread Jan Hudec
On Sun, Jan 15, 2012 at 15:17:37 -0600, Bill McCormick wrote:
> Tim Streater wrote, On 1/15/2012 3:00 PM:
> >On 15 Jan 2012 at 20:44, Bill McCormick  wrote:
> >
> >>What is the problem with the shared lib stuff?
> >>
> >>Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:
> >>>A simple one -- and please compile sqlite3.c into your program and make
> >>>everybody happy.
> >>>
> >>>Forget the shared library stuff as we have just been talking about.
> >The problem is that the computer vendor installs a shared lib with
> >a version of the library. Some 3rd party app installer then replaced that
> >shared lib with another version, and existing apps don't like it.
> >
> >SQLite is small enough that it can be compiled and linked in in its entirety.

I am quite certain Debian requires packages to be linked dynamically to
libraries that are packaged, the strongest reason being security support.

Of course since Debian package declares dependency and versions, 3rd party
installer won't just replace the shared library with incompatible version.

> OK. I don't see this as a problem for my use case. It would be
> better for me to stick with the shared libs.
> 
> What is the difference between the two libs: libsqlite.so.0 and
> libsqlite3.so.0? I assume that I'll be linking to libsqlite3.

When you are compiling, you link against the .so file, which is symlink to
the actual .so.0 file. That file is provided by 'libsqlite3-dev' package and
is called '/usr/lib/libsqlite3.so'. The corresponding linker option is
'-lsqlite3'. Since the header is installed as '/usr/include/sqlite3.h', you
don't need any special options for compilation step. To see where the files
are, use 'dpkg -L libsqlite3-dev'.

-- 
 Jan 'Bulb' Hudec 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] makefile for c

2012-01-16 Thread Dan Kennedy

On 01/16/2012 04:17 AM, Bill McCormick wrote:

Tim Streater wrote, On 1/15/2012 3:00 PM:

On 15 Jan 2012 at 20:44, Bill McCormick wrote:


What is the problem with the shared lib stuff?

Thanks!!
Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:

A simple one -- and please compile sqlite3.c into your program and make
everybody happy.

Forget the shared library stuff as we have just been talking about.

The problem is that the computer vendor installs a shared lib with a
version of the library. Some 3rd party app installer then replaced
that shared lib with another version, and existing apps don't like it.

SQLite is small enough that it can be compiled and linked in in its
entirety.

--
Cheers -- Tim


OK. I don't see this as a problem for my use case. It would be better
for me to stick with the shared libs.

What is the difference between the two libs: libsqlite.so.0 and
libsqlite3.so.0?


"libsqlite.so.0" is probably sqlite version 2. It's around for
compatibility only, you don't want to use it for new programs.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] makefile for c

2012-01-16 Thread Black, Michael (IS)
If you insist on using the shared library instead of compiling in as we all 
recommend you don't need to worry about the different file extensions on the 
shared libraries.  There are no options when linking the shared libary.



CFLAGS=-O
OBJECTS=myapp.o
LIBS=-lsqlite3 -lpthread -ldl
myapp:  $(OBJECTS)
$(CC) -o $@ $(OBJECTS) $(LIBS)



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Bill McCormick [wpmccorm...@gmail.com]
Sent: Sunday, January 15, 2012 3:17 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] makefile for c

Tim Streater wrote, On 1/15/2012 3:00 PM:
> On 15 Jan 2012 at 20:44, Bill McCormick  wrote:
>
>> What is the problem with the shared lib stuff?
>>
>> Thanks!!
>> Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:
>>> A simple one -- and please compile sqlite3.c into your program and make
>>> everybody happy.
>>>
>>> Forget the shared library stuff as we have just been talking about.
> The problem is that the computer vendor installs a shared lib with a version 
> of the library. Some 3rd party app installer then replaced that shared lib 
> with another version, and existing apps don't like it.
>
> SQLite is small enough that it can be compiled and linked in in its entirety.
>
> --
> Cheers  --  Tim

OK. I don't see this as a problem for my use case. It would be better
for me to stick with the shared libs.

What is the difference between the two libs: libsqlite.so.0 and
libsqlite3.so.0? I assume that I'll be linking to libsqlite3.

What about options? Is there a makefile example out there somewhere?

Thanks!!
___
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


Re: [sqlite] makefile for c

2012-01-15 Thread Bill McCormick

Tim Streater wrote, On 1/15/2012 3:00 PM:

On 15 Jan 2012 at 20:44, Bill McCormick  wrote:


What is the problem with the shared lib stuff?

Thanks!!
Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:

A simple one -- and please compile sqlite3.c into your program and make
everybody happy.

Forget the shared library stuff as we have just been talking about.

The problem is that the computer vendor installs a shared lib with a version of 
the library. Some 3rd party app installer then replaced that shared lib with 
another version, and existing apps don't like it.

SQLite is small enough that it can be compiled and linked in in its entirety.

--
Cheers  --  Tim


OK. I don't see this as a problem for my use case. It would be better 
for me to stick with the shared libs.


What is the difference between the two libs: libsqlite.so.0 and 
libsqlite3.so.0? I assume that I'll be linking to libsqlite3.


What about options? Is there a makefile example out there somewhere?

Thanks!!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] makefile for c

2012-01-15 Thread Tim Streater
On 15 Jan 2012 at 20:44, Bill McCormick  wrote: 

> What is the problem with the shared lib stuff?
>
> Thanks!!
> Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:
>> A simple one -- and please compile sqlite3.c into your program and make
>> everybody happy.
>>
>> Forget the shared library stuff as we have just been talking about.

The problem is that the computer vendor installs a shared lib with a version of 
the library. Some 3rd party app installer then replaced that shared lib with 
another version, and existing apps don't like it.

SQLite is small enough that it can be compiled and linked in in its entirety.

--
Cheers  --  Tim
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] makefile for c

2012-01-15 Thread Bill McCormick
Sorry, I just joined the list so I'm not privy to anything "we have just 
been talking about".


I quick peek at the archives didn't reveal anything either.

Also, as I installed sqlite on Debian Squeeze with apt-get install (as 
opposed to compiling from source), I wouldn't have sqlite3.c to make 
sqlite3.o.


What is the problem with the shared lib stuff?

Thanks!!
Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:

A simple one -- and please compile sqlite3.c into your program and make 
everybody happy.

Forget the shared library stuff as we have just been talking about.



CFLAGS=-O

OBJECTS=myapp.o sqlite3.o

LIBS=-lpthread -ldl

myapp:  $(OBJECTS)

 $(CC) -o $@ $(OBJECTS) $(LIBS)



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Bill McCormick [wpmccorm...@gmail.com]
Sent: Sunday, January 15, 2012 2:23 PM
To: sqlite-users@sqlite.org
Subject: EXT :[sqlite] makefile for c

I'm looking for an example c program makefile for compiling and linking
in the SQLite lib to gcc compiled programs.

I'm not sure which lib to include between libsqlite.so.0 and
libsqlite3.so.0 and what options I should pass to gcc.

Where is this documented?

Thanks!!
___
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


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] makefile for c

2012-01-15 Thread Black, Michael (IS)
A simple one -- and please compile sqlite3.c into your program and make 
everybody happy.

Forget the shared library stuff as we have just been talking about.



CFLAGS=-O

OBJECTS=myapp.o sqlite3.o

LIBS=-lpthread -ldl

myapp:  $(OBJECTS)

$(CC) -o $@ $(OBJECTS) $(LIBS)



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Bill McCormick [wpmccorm...@gmail.com]
Sent: Sunday, January 15, 2012 2:23 PM
To: sqlite-users@sqlite.org
Subject: EXT :[sqlite] makefile for c

I'm looking for an example c program makefile for compiling and linking
in the SQLite lib to gcc compiled programs.

I'm not sure which lib to include between libsqlite.so.0 and
libsqlite3.so.0 and what options I should pass to gcc.

Where is this documented?

Thanks!!
___
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


[sqlite] makefile for c

2012-01-15 Thread Bill McCormick
I'm looking for an example c program makefile for compiling and linking 
in the SQLite lib to gcc compiled programs.


I'm not sure which lib to include between libsqlite.so.0 and 
libsqlite3.so.0 and what options I should pass to gcc.


Where is this documented?

Thanks!!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users