Re: linking libgit.a in C++ projects
- From
cte <cestreich@gmail.com>
- Date
- Jul 31, 2008, 11:20 UTC
- Message-ID
- <ac9f0f090807310420y23150005jbd0bcaec061301c4@mail.gmail.com>
- In-Reply-To
- <0EC13CCC-0F7B-41A0-BEB2-67E6EC8D5E37@simplicidade.org>
Show 10 quoted lines
>> Fortunately, g++ can compile C programs and link static libraries that >> were compiled by C compilers, unless of course, they use C++ keywords. >> I don't think it is unreasonable to rename the _very few_ C++ keywords >> in git's source in the interest of allowing C++ projects to leverage >> libgit. > > I think the point Dmitry was trying to make is that you should compile > libgit as C, using gcc, and then link it with your C++/Objective C code. > > No patch is required to git, only to your makefile/xcode project file.
The git .h files must be in your include path, and must not contain C++ keywords in order to link against libgit.a.