Log in or register to post comments

IOS - Problem: View the samples

August 19, 2011 - 3:11pm #1

Hello, I new here. I work in mac and I want to test the samples but when i try to compile then in my Xcode simply then failed. The version of Xcode with i'm working is the 4.2. The error that Xcode print is:

ld: warning: ignoring file ../../build/lib/arm/libQCAR.a, missing required architecture i386 in file
Undefined symbols for architecture i386:
"QCAR::Renderer::getInstance()", referenced from:
-[EAGLView renderFrameQCAR] in EAGLView.o
-[EAGLView configureVideoBackground] in EAGLView.o
"QCAR::State::getActiveTrackable(int) const", referenced from:
-[EAGLView renderFrameQCAR] in EAGLView.o
"QCAR::Tool::convertPose2GLMatrix(QCAR::Matrix34F const&)", referenced from:
-[EAGLView renderFrameQCAR] in EAGLView.o
"QCAR::State::getNumActiveTrackables() const", referenced from:
-[EAGLView renderFrameQCAR] in EAGLView.o
"QCAR::State::~State()", referenced from:
-[EAGLView renderFrameQCAR] in EAGLView.o
"QCAR::requiresAlpha()", referenced from:
-[EAGLView initRendering] in EAGLView.o
"QCAR::CameraDevice::getInstance()", referenced from:
-[EAGLView configureVideoBackground] in EAGLView.o
-[EAGLView stopCamera] in EAGLView.o
-[EAGLView startCamera] in EAGLView.o
-[EAGLView actionSheet:clickedButtonAtIndex:] in EAGLView.o
"QCAR::Tracker::getInstance()", referenced from:
-[EAGLView stopCamera] in EAGLView.o
-[EAGLView startCamera] in EAGLView.o
-[EAGLView loadTracker] in EAGLView.o
"QCAR::Tool::getProjectionGL(QCAR::CameraCalibration const&, float, float)", referenced from:
-[EAGLView startCamera] in EAGLView.o
"QCAR::setInitParameters(int)", referenced from:
-[EAGLView initQCAR] in EAGLView.o
"QCAR::init()", referenced from:
-[EAGLView initQCAR] in EAGLView.o
"QCAR::onSurfaceCreated()", referenced from:
-[EAGLView initApplication] in EAGLView.o
"QCAR::onSurfaceChanged(int, int)", referenced from:
-[EAGLView initApplication] in EAGLView.o
"QCAR::onPause()", referenced from:
-[EAGLView onPause] in EAGLView.o
"QCAR::onResume()", referenced from:
-[EAGLView onResume] in EAGLView.o
"QCAR::deinit()", referenced from:
-[EAGLView onDestroy] in EAGLView.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

I don't know resolve this error. I hope someone can help me.

Re: IOS - Problem: View the samples

October 18, 2011 - 1:29am #8

[QUOTE=davetatch" />http://ar.qualcomm.at/node/2000796>
if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera" />){
// get the camera
}[/CODE" />[/QUOTE" />

[I" />"I'm sorry, Dave. I'm afraid I can't do that. " [=1" />(That will be lost on generations who haven't seen '2001 A Space Oddysey' :-)[/SIZE" />[/I" />

That's certainly a way [B" />on the device[/B" /> for deciding whether to enable QCAR for those iPad 1's out there, but in this case it's a link-time issue so this won't help you.

See my reply in comment #4 which will enable you to use the simulator for testing without AR - you'd need to fabricate a dummy pose to place your 3D augmentation.

From personal experience, the time taken to start up a debug session on the device is fairly insignificant compared to the length of time you'd normally be running a debug session, so I wouldn't recommend spending a lot of time trying to engineer something specifically for the simulator.

Re: IOS - Problem: View the samples

October 17, 2011 - 8:51pm #7

It's significantly quicker using the simulator, I'm not sure where in the QCAR code it picks up the camera - but couldn't you use something like:

 if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){
  // get the camera
}

Re: IOS - Problem: View the samples

September 30, 2011 - 1:55am #6
hydex86 wrote:

Could you give me a simple sample code to replace EAGLView.mm file that works on simulator? I would like try the library to begin understanding what it does.

Sorry, but libQCAR requires to have the camera present and working, so will only work on a real device.

With a device connected during an Xcode session, you can do most everything that can be debugged in the simulator, at very little extra overhead.

Re: IOS - Problem: View the samples

September 29, 2011 - 4:58pm #5

Could you give me a simple sample code to replace EAGLView.mm file that works on simulator? I would like try the library to begin understanding what it does.

Thanks a lot

Re: IOS - Problem: View the samples

September 12, 2011 - 3:47am #4
reprotector wrote:

Thanks for your help.

There is no way to try it in simulator?

The normal way to do this in an iOS app is to make a duplicate target of your app, without the libQCAR.a referenced.

Then either:

1) replace the EAGLView.mm with an alternate that doesn't use QCAR::

or:

2) within EAGLView.mm, use "#ifdef __i386__" to detect the build is for the simulator and provide alternate code, with the original device code in the "#else" block.

Re: IOS - Problem: View the samples

September 7, 2011 - 1:00pm #3

Thanks for your help.

There is no way to try it in simulator? I Know that I can't use camera in simulator, but my app is not just AR app. I have another features and I don't want to try on device every single time.

Re: IOS - Problem: View the samples

August 22, 2011 - 2:19am #2

The clue is here "missing required architecture i386 in file".

The QCAR library is not built for use in the simulator, as it requires active use of the camera - please run and debug on the device.

Log in or register to post comments