Log in or register to post comments

Linker errors

August 11, 2011 - 6:12am #1

Hi,

while the native samples are compiling and running perfectly on both our iPad 2 and iPhone 4, I'm having some trouble getting things to work from Unity.

For example, when I load the ImageTargets sample, open the build settings, set up the bundle identifier, Unity does its thing and launches Xcode. So far so good. But after compiling I get 24 Linker errors, a couple of which are here:

 "_OBJC_CLASS_$_AVCaptureDevice", referenced from:
      objc-class-ref in libQCAR.a(libQCAR.a-armv6-master.o)
  "_kCVPixelBufferPixelFormatTypeKey", referenced from:
      l2777 in libQCAR.a(libQCAR.a-armv6-master.o)
  "_CMSampleBufferGetImageBuffer", referenced from:
      l2795 in libQCAR.a(libQCAR.a-armv6-master.o)
  "_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from:
      objc-class-ref in libQCAR.a(libQCAR.a-armv6-master.o)
  "_OBJC_CLASS_$_AVCaptureVideoDataOutput", referenced from:

I Googled a bit, and found that when I manually add these frameworks to the project, the linker errors go away:
- AVFoundation.framework
- CoreMedia.framework
- CoreVideo.framework

But then, after installing and running, this message appears in the status bar: GDB: Program received signal: "EXC_BAD_ACCESS"

The console log shows this:

Running…
[Switching to thread 11779]
[Switching to thread 11779]
sharedlibrary apply-load-rules all
continue
2011-08-11 15:00:00.690 QCARTestProject[3226:707] -> registered mono modules 0xe76744
-> applicationDidFinishLaunching()
Renderer: PowerVR SGX 535
Vendor:   Imagination Technologies
Version:  OpenGL ES 2.0 IMGSGX535-58.6
GL_OES_depth_texture GL_OES_depth24 GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_shader_texture_lod GL_EXT_texture_filter_anisotropic GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_IMG_read_format GL_IMG_texture_compression_pvrtc 
Creating OpenGLES2.0 graphics device
Non platform assembly: data-0x5f67000 (this message is harmless)
Non platform assembly: data-0x5f09000 (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/11235A88-ED49-4E9E-BB27-FC51C79BFCC1/QCARTestProject.app/Data/Managed/System.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/11235A88-ED49-4E9E-BB27-FC51C79BFCC1/QCARTestProject.app/Data/Managed/Mono.Security.dll (this message is harmless)
StartQCAR
 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

2011-08-11 15:00:03.165 QCARTestProject[3226:707] 2011-08-11 15:00:03: ERROR: Camera can't initialize while QCAR is not operational

viewport:
(left:320.00, top:0.00, width:0.00, height:960.00)
 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

2011-08-11 15:00:03.239 QCARTestProject[3226:707] 2011-08-11 15:00:03: WARNING: Changing video mode while the camera is running

2011-08-11 15:00:03.244 QCARTestProject[3226:707] CameraImpl: stopCapturing already called, capture session already stopped?
2011-08-11 15:00:03.248 QCARTestProject[3226:707] 2011-08-11 15:00:03: ERROR: Camera can't select video mode while QCAR is not operational

2011-08-11 15:00:03.252 QCARTestProject[3226:707] 2011-08-11 15:00:03: ERROR: Camera can't start while QCAR is not operational

2011-08-11 15:00:03.256 QCARTestProject[3226:707] 2011-08-11 15:00:03: ERROR: Camera can't start while QCAR is not operational

projection:
NaN	NaN	NaN	NaN
NaN	NaN	NaN	NaN
0.00000	0.00000	-1.00080	-4.00160
0.00000	0.00000	-1.00000	0.00000

 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

Error: Trackable named stones does not exist.
 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

Error: Trackable named chips does not exist.
 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

Absolute number of trackables: 0
 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

Trackable stones lost
 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

Trackable chips lost
 
(Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 34)

Program received signal:  “EXC_BAD_ACCESS”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).

Unity version: 3.4.0f5
QCAR iOS version 1.0.0beta1
Mac version: OS X 10.6.8
XCode version: 3.2.6
Device model: final error happens on both iPhone 4 and iPod 2 (but is likely the result of earlier problem)
iOS version of iPhone: 4.3.3 (8J2)

Any idea what could be the problem?

Lex

Linker errors

May 13, 2014 - 1:37am #6

Hi,

I have exactly the same problem than Lex which is : ERROR: Camera can't start while QCAR is not operational with the exactly same message in the console log. I tried some projects sample which work perfectly but I still have my problem in my app so the solution of Lex didn't work for me. Any idea what could be the problem because it's the only post about that?

Clem

Re: Linker errors

August 22, 2011 - 12:43am #5

Hi MoSR,

Thanks, it's good to hear that you guys are on top of these things!

Lex

Re: Linker errors

August 11, 2011 - 7:20am #4
lexvandersluijs wrote:

Another update:

I reinstalled the SDK and Unity plugin, no difference.

Then I thought, Let's try some more projects, see how I goes with the MultiTarget sample for example. This worked perfectly. Then I tried it again with the FrameMarkers sample: no problem.

I noticed that in these newly generated projects, the frameworks I mentioned earlier indeed are included, and not in the Frameworks folder, but right in the root of the project. Don't know if that is a problem, but it's certainly a difference.

I'm guessing that something went wrong when I published from Unity for the first time, which left the project in a weird state.

In any event, problem solved! :):)

Well done Lex! :) We were watching your thread, but it did seem to be a journey you had to go on. I'm not clear what caused your earlier glitch, but if we see it from more people we'll take a closer look.

Re: Linker errors

August 11, 2011 - 7:01am #3

Another update:

I reinstalled the SDK and Unity plugin, no difference.

Then I thought, Let's try some more projects, see how I goes with the MultiTarget sample for example. This worked perfectly. Then I tried it again with the FrameMarkers sample: no problem.

I noticed that in these newly generated projects, the frameworks I mentioned earlier indeed are included, and not in the Frameworks folder, but right in the root of the project. Don't know if that is a problem, but it's certainly a difference.

I'm guessing that something went wrong when I published from Unity for the first time, which left the project in a weird state.

In any event, problem solved! :):)

Re: Linker errors

August 11, 2011 - 6:19am #2

Additional info:

In the Build settings -> Player settings I've set

  • Target Device: iPhone + iPad
  • Target Platform: Universal armv6+armv7 (OpenGL ES 1.1+2.0)
  • SDK Version: iOS latest (4.3)
  • Target iOS version: 4.3.
  • Stripping level: Disabled
Log in or register to post comments