Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
On Tue, Jun 28, 2011 at 8:55 PM, Charles Samuels wrote: > However, be warned that if you use exceptions, you can't use sqlite3_exec, > because then the exceptions can't make it through the C code. It's easy > enough > to roll your own sqlite3_exec and compile it as C++. > To expand upon that a bi

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Charles Samuels
On Tuesday, June 28, 2011 9:36:22 f.h. Stephan Beal wrote: > There is NOTHING wrong with mixing .c and .cpp files in one C++ project. > Compile the C code with gcc and C++ code with g++, and then link them > together as you would any other objects. Compiling sqlite as C++ is "hopeless", so this is

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
On Tue, Jun 28, 2011 at 8:13 PM, Simon Slavin wrote: > That's clever. And it allows quick regression testing in case something > mysteriously stops working. > :-D Here's the makefile code... it of course relies on other project details, but you'll get the idea: ###

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Simon Slavin
On 28 Jun 2011, at 7:04pm, Stephan Beal wrote: > in my latest > sqlite3-using project i structured the build so that if sqlite3.[ch] are > found in the build tree, that sqlite3 is used, otherwise we use whatever's > on the system. i did that because when i launched my project on my web > hoster i

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
On Tue, Jun 28, 2011 at 8:04 PM, Stephan Beal wrote: > You're both very right, and might i suggest a compromise: in my latest > Might i add that all involved machines were some flavour of Linux, which favour's Simon's argument against relying on the system's sqlite3. -- - stephan beal http

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
On Tue, Jun 28, 2011 at 7:53 PM, Simon Slavin wrote: > On 28 Jun 2011, at 5:34pm, Jan Hudec wrote: > > Let me express very, very strong disagreement with that. In Linux you > should > > *always* use system sqlite and specify minimal required version as > desired > > This works only if you h

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Simon Slavin
On 28 Jun 2011, at 5:34pm, Jan Hudec wrote: > On Tue, Jun 28, 2011 at 11:07:50 +, Black, Michael (IS) wrote: >> I'd recommend NOT relying on the system sqlite3. That way you can control >> your changes. > > Let me express very, very strong disagreement with that. In Linux you should > *alw

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
On Tue, Jun 28, 2011 at 6:45 AM, Phong Cao wrote: > However, the program was not compiled. I also read on some forums saying > that sqlite3 must be compiled with gcc. But since I am using gtkmm and C++ > code for my project I wonder if there is anyway possible to compile sqlite3 > using g++? If s

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Jan Hudec
On Tue, Jun 28, 2011 at 11:07:50 +, Black, Michael (IS) wrote: > I'd recommend NOT relying on the system sqlite3. That way you can control > your changes. Let me express very, very strong disagreement with that. In Linux you should *always* use system sqlite and specify minimal required vers

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Black, Michael (IS)
on Systems Advanced Analytics Directorate From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Phong Cao [phn...@gmail.com] Sent: Monday, June 27, 2011 11:45 PM To: sqlite-users@sqlite.org Subject: EXT :[sqlite] Compile sqlite3

[sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-27 Thread Phong Cao
Hello everybody, I am trying to use g++ to compile my C++ application, which uses sqlite3. After googling for several hours this is what I tried: g++ -g /home/phongcao/main.cc -o -lsqlite3 /home/phongcao/main `pkg-config --cflags --libs gtkmm-2.4` However, the program was not compiled. I also re