SUSHMITAH / btstack

Automatically exported from code.google.com/p/btstack
0 stars 0 forks source link

symbols not found when link against libBtStack.a #97

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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/ar
mv7/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:/us
r/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.LinkFile
List -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/ar
mv6/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:/us
r/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.LinkFile
List -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.

Original issue reported on code.google.com by snk0826...@gmail.com on 11 Nov 2010 at 3:00

GoogleCodeExporter commented 8 years ago
by including run_loop_cocoa.m in my own project, the problem has been resolved.

Original comment by snk0826...@gmail.com on 11 Nov 2010 at 6:33

GoogleCodeExporter commented 8 years ago
hi. 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)

Original comment by matthias.ringwald@gmail.com on 11 Nov 2010 at 8:36

GoogleCodeExporter commented 8 years ago
funny. I forgot a rule to include any .m files for the static library. fixed in 
r965

Original comment by matthias.ringwald@gmail.com on 11 Nov 2010 at 8:48

GoogleCodeExporter commented 8 years ago
Hi, 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.

Original comment by snk0826...@gmail.com on 12 Nov 2010 at 1:11

GoogleCodeExporter commented 8 years ago
for 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.

Original comment by matthias.ringwald@gmail.com on 12 Nov 2010 at 8:20

GoogleCodeExporter commented 8 years ago
I was not reporting a new issue in comment 4. I was saying why I choose to link 
againt static library.

Original comment by snk0826...@gmail.com on 12 Nov 2010 at 12:54

GoogleCodeExporter commented 8 years ago
oh. 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.

Original comment by matthias.ringwald@gmail.com on 12 Nov 2010 at 3:50