I'd recommend NOT relying on the system sqlite3. That way you can control your changes.
Get the amalgamation and put sqlite3.c and sqlite3.h in your project. And, you forgot to put in the name for "-o" -- so you would get a file named "-lsqlite3" in your directory. And you'll probably need at least two more libraries. In one line g++ -g /home/phongcao/main.cc -o main sqlite3.c /home/phongcao/main `pkg-config --cflags --libs gtkmm-2.4` -lthread -ldl Perhaps gtkmm puts -lthread and -ldl in there. Michael D. Black Senior Scientist NG Information 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 with g++? Do I need a wrapper? 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 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 so, please tell me how. Thank you for reading my message! Have a good day! Best regards, -- Phong V. Cao phn...@gmail.com ca...@rider.edu _______________________________________________ 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