0
Build WikitudeAPI-SCM-Test of project WikitudeAPI-SCM-Test with configuration Debug

Ld build/Debug-iphonesimulator/WikitudeAPI-SCM-Test.app/WikitudeAPI-SCM-Test normal i386
cd /Users/srinivas/Downloads/WikitudeAPI_iPhone_1.0.7/SampleApp
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Users/srinivas/Downloads/WikitudeAPI_iPhone_1.0.7/SampleApp/build/Debug-iphonesimulator -L../WikitudeAPI -L../WikitudeAPI/usr -L../WikitudeAPI/usr/local -L../WikitudeAPI/usr/local/include -L../WikitudeAPI/usr/local/resources -L../WikitudeAPI/usr/local/resources/images -L../WikitudeAPI/usr/local/resources/libs -L../WikitudeAPI/usr/local/resources/nibs -L../WikitudeAPI/usr/local/resources/images/RECHECK -F/Users/srinivas/Downloads/WikitudeAPI_iPhone_1.0.7/SampleApp/build/Debug-iphonesimulator -filelist /Users/srinivas/Downloads/WikitudeAPI_iPhone_1.0.7/SampleApp/build/WikitudeAPI-SCM-Test.build/Debug-iphonesimulator/WikitudeAPI-SCM-Test.build/Objects-normal/i386/WikitudeAPI-SCM-Test.LinkFileList -mmacosx-version-min=10.6 -all_load -ObjC -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CFNetwork -framework CoreData -framework CoreFoundation -framework CoreLocation -framework MapKit -framework MessageUI -framework QuartzCore -framework SystemConfiguration -lsqlite3.0 -lWikitudeAPI -lGoogleAnalytics -o /Users/srinivas/Downloads/WikitudeAPI_iPhone_1.0.7/SampleApp/build/Debug-iphonesimulator/WikitudeAPI-SCM-Test.app/WikitudeAPI-SCM-Test

ld: warning: in ../WikitudeAPI/libWikitudeAPI.a, missing required architecture i386 in file
Undefined symbols:
  "_OBJC_CLASS_$_WTPoi", referenced from:
      objc-class-ref-to-WTPoi in WikitudeAPI_SCM_TestAppDelegate.o
      objc-class-ref-to-WTPoi in CustomMenuButtonDelegateImpl1.o
  "_OBJC_CLASS_$_WikitudeARCustomMenuButton", referenced from:
      objc-class-ref-to-WikitudeARCustomMenuButton in WikitudeAPI_SCM_TestAppDelegate.o
  "_OBJC_CLASS_$_WikitudeARViewController", referenced from:
      objc-class-ref-to-WikitudeARViewController in WikitudeAPI_SCM_TestAppDelegate.o
      objc-class-ref-to-WikitudeARViewController in CustomMenuButtonDelegateImpl1.o
      objc-class-ref-to-WikitudeARViewController in CustomMenuButtonDelegateImpl3.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
4

2 回答 2

2

Wikiitude SDK 仅适用于实际的 iOS 设备,模拟器不支持摄像头和必要的传感器(加速度计、磁力计)。

请尝试在实际的 iOS 设备上构建和部署,然后一切都应该按预期工作。

干杯,尼古拉斯

于 2011-09-22T07:33:37.063 回答
0

This is an old post but I didn't find a positive answer. Actually, I found a way to make it possible to compile in Simulator.

First of all, I edited the class (both h and m) with the Wikitude implementation and work with conditionals: it loads an interface and implementation when it's not a Simulator and it loads another interface and implementation when it's a Simulator:

Example.h

#import <UIKit/UIKit.h>
#import "Example.h"

#if !TARGET_IPHONE_SIMULATOR
#import <WikitudeSDK/WTArchitectView.h>

@interface Example : UIViewController <WTArchitectViewDelegate>
{
    WTArchitectView *_architectView;
}

@property (nonatomic, strong) WTArchitectView *architectView;

@end
#else
@interface Example : UIViewController {

}

@end
#endif

Example.m

#import "Example.h"

#if !TARGET_IPHONE_SIMULATOR
@interface Example () {
}

@end

@implementation Example // implementation for devices
.
.
.
@end
#else
@interface Example ()

@end

@implementation Example // implementation for simulator
.
.
.
@end
#endif

To toggle between compiling on the simulator and on devices, you just have to deactivate or activate the WikitudeSDK.framework for the current target:

1) Choose the WikitudeSDK.framework from the "Project Navigator" on the left panel.

2) Deactivate it for the current target using the "File Inspector" on the right panel.

It worked for me.

Best regards!

于 2013-06-26T19:45:36.223 回答