What steps will reproduce the problem? 1. follow the instructions in Getting Started to make the project 2. link to libBtStack.a in an ios project (using sdk 4.0) 3. build
What is the expected output? What do you see instead?
got the error messages: Ld build/SimoMateServer.build/Debug-iphoneos/SimoMateServer.build/Objects-normal/armv7/SimoMateServer normal armv7 cd /Users/samlai/Documents/workspace/ios/SimoMateServer setenv IPHONEOS_DEPLOYMENT_TARGET 4.0 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -L/Users/samlai/Documents/workspace/ios/SimoMateServer/build/Debug-iphoneos -L/Users/samlai/Documents/workspace/ios/SimoMateServer -L/Users/samlai/Documents/workspace/ios/SimoMateServer/BtStack/lib -F/Users/samlai/Documents/workspace/ios/SimoMateServer/build/Debug-iphoneos -filelist /Users/samlai/Documents/workspace/ios/SimoMateServer/build/SimoMateServer.build/Debug-iphoneos/SimoMateServer.build/Objects-normal/armv7/SimoMateServer.LinkFileList -dead_strip -miphoneos-version-min=4.0 -framework Foundation -lBTstack -o /Users/samlai/Documents/workspace/ios/SimoMateServer/build/SimoMateServer.build/Debug-iphoneos/SimoMateServer.build/Objects-normal/armv7/SimoMateServer
Undefined symbols: "_run_loop_cocoa", referenced from: _run_loop_cocoa$non_lazy_ptr in libBTstack.a(run_loop.o) (maybe you meant: _run_loop_cocoa$non_lazy_ptr) ld: symbol(s) not found collect2: ld returned 1 exit status
Ld build/SimoMateServer.build/Debug-iphoneos/SimoMateServer.build/Objects-normal/armv6/SimoMateServer normal armv6 cd /Users/samlai/Documents/workspace/ios/SimoMateServer setenv IPHONEOS_DEPLOYMENT_TARGET 4.0 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -L/Users/samlai/Documents/workspace/ios/SimoMateServer/build/Debug-iphoneos -L/Users/samlai/Documents/workspace/ios/SimoMateServer -L/Users/samlai/Documents/workspace/ios/SimoMateServer/BtStack/lib -F/Users/samlai/Documents/workspace/ios/SimoMateServer/build/Debug-iphoneos -filelist /Users/samlai/Documents/workspace/ios/SimoMateServer/build/SimoMateServer.build/Debug-iphoneos/SimoMateServer.build/Objects-normal/armv6/SimoMateServer.LinkFileList -dead_strip -miphoneos-version-min=4.0 -framework Foundation -lBTstack -o /Users/samlai/Documents/workspace/ios/SimoMateServer/build/SimoMateServer.build/Debug-iphoneos/SimoMateServer.build/Objects-normal/armv6/SimoMateServer
Undefined symbols: "_run_loop_cocoa", referenced from: _run_loop_cocoa$non_lazy_ptr in libBTstack.a(run_loop.o) (maybe you meant: _run_loop_cocoa$non_lazy_ptr) ld: symbol(s) not found collect2: ld returned 1 exit status
What version of the product are you using? On what operating system?
Please provide any additional information below.
Comment #1
Posted on Nov 11, 2010 by Grumpy Birdby including run_loop_cocoa.m in my own project, the problem has been resolved.
Comment #2
Posted on Nov 11, 2010 by Swift Oxhi. thanks for reporting. Indeed, run_loop_cocoa.m is missing libBTstack.a but not in libBTstack.dylib. I'll try to fix that later.
Anyway, most BTstack app links against libBTstack.dylib. Do you use the static .a on purpose and can you tell me why? (You may respond in private to matthias.ringwald@gmail.com if you like)
Comment #3
Posted on Nov 11, 2010 by Swift Oxfunny. I forgot a rule to include any .m files for the static library. fixed in r965
Comment #4
Posted on Nov 12, 2010 by Grumpy BirdHi, libBtTstack.dylib could be replaced by other's version, I got a "WARNING: execute not available for RUN_LOOP_COCOA!" when there is an older version installed on the device.
Comment #5
Posted on Nov 12, 2010 by Swift Oxfor an POSIX environment, BTstack brings its own run loop. In a Cocoa(Touch) environment, it seamlessly integrates with the app's run loop (for UIKit apps). In that case, you only register all BTstack stuff and don't (need to) call run_loop_execute() - that's why I give a warning.
In the latest SVN revision, run_loop_execute create another Cocoa run loop to keep the semantics.
Please discuss on the BTstack Google Group and not here.. these are for actual "Issues" of BTstack, not developer support.
Comment #6
Posted on Nov 12, 2010 by Grumpy BirdI was not reporting a new issue in comment 4. I was saying why I choose to link againt static library.
Comment #7
Posted on Nov 12, 2010 by Swift Oxoh. sorry, I didn't understand your comment. In such a case where you depend on a feauture/detail not in Cydia/BigBoss repository, I would suggest to urge me to release a newer version and use package dependencies.
Status: Fixed
Labels:
Type-Defect
Priority-Medium