Couchbase lite 1.1 - cordova


#1

with couchbase lite 1.1 phonegap, I got the following error for my ios project which worked ok with cb lite 1.0:

Undefined symbols for architecture x86_64:
"_CBLRegisterJSViewCompiler", referenced from:
-[CBLite launchCouchbaseLite] in CBLite.o
"OBJC_CLASS$_CBLDatabase", referenced from:
objc-class-ref in CBLite.o
"OBJC_CLASS$_CBLManager", referenced from:
objc-class-ref in CBLite.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


#2

Double check your project to make sure that libCBLJSViewCompiler.a is in the build phases section. That is where those symbols are defined.


#3

Thanks borrden.
After I added libCBLJSViewCompiler.a from com.couchbase.lite.phonegap folder, I got this error:


ld: warning: directory not found for option '-L"/Users/fsdev/Developer/Projects/workspace/nftg/nftgApp/cdvApp/platforms/ios/ForestGuide/Plugins/com.couchbase.lite.phonegap"'
Undefined symbols for architecture x86_64:
"_CBLGetReduceFunc", referenced from:
-[CBLJSViewCompiler compileReduceFunction:language:] in libCBLJSViewCompiler.a(CBLJSViewCompiler.o)
OBJC_CLASS$_CBLDatabase”, referenced from:
objc-class-ref in CBLite.o
objc-class-ref in libCBLJSViewCompiler.a(CBLRegisterJSViewCompiler.o)
OBJC_CLASS$_CBLManager”, referenced from:
objc-class-ref in CBLite.o
"OBJC_CLASS$_CBLView", referenced from:
objc-class-ref in libCBLJSViewCompiler.a(CBLRegisterJSViewCompiler.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


#4

Sounds like you are still missing references to needed libraries. What is listed under your build phases in “link with libraries” ?


#5

what libraries are required for cb lite 1.1? besides required framework such as JavascriptCore, SystemConfiguration,… etc, I have these three libs: libCBLJSViewer.a, libCordova.a and libstdc++.dylib.


#6

Did you build this according to a set of instructions? I attached a screenshot of what I got by building ToDo-Lite for phonegap. That being said, it doesn’t seem to work correctly for me, but I know nothing about Cordova so I’m not a good person to ask.