Hi, I just attended @mattispasch SoCal Code Camp and was hoping to follow allow and implement a Python/C Couchbase Lite client. After installed the CE server and C SDK using the http://packages.couchbase.com/clients/c/couchbase-csdk-setup Perl script on Ubuntu 12.04 64-bit I ran into the following compile time errors. He suggested I ask here to see if anyone had the same issue.
You need to add -lcouchbase after the source/object file, not before. This is because when it is specified before the object file, the linker will decide that it doesn’t need any of its symbols (since none of the objects passed before the library require them).
Thanks @mnunberg! That was the issue.
Library flags or names given to compilers when they are supposed to invoke the linker, ‘ld’. Non-library linker flags, such as -L, should go in the LDFLAGS variable.
Extra flags to give to compilers when they are supposed to invoke the linker, ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable instead.