views:

1017

answers:

1

I am writing an application in C++/C/Object-C cocoa environment for OSX 10.6

For specific reasons, I cannot make changes to the make file so that I can not link the "libsqlite3.0.dylib" library during build.

In my source files, I included . Since I cannot link the library with the framework, I was wondering how can include a library as part my source file, specifically how do I include libsqlite3.0.dylib?

usr/lib/libsqlite3.0.dylib

this is for MAX OSX 10.6

A: 

You cannot include an already-compiled library into your source code and use it. You absolutely need source code statements in source code.

However, you can include the sources of sqlite in your source code. In this tar file, the sqlite source code is in sqlite3.c.

Martin v. Löwis
Interesting, I just need to include sqlite3.c in my source file would that still work since I can't change the make file of the project?
ReachConnection
Yes, if you include the C file in some other C file, you don't need to change the Makefile. You may have to include some of the header files as well.
Martin v. Löwis
I have tried that, it doesn't work during compile time be the sqlite3 functions are not referenced. I am working around this issue by creating a temporarily local makefile that will include the sqlite3 library
ReachConnection