尝试执行 Wikitude 示例应用程序,但出现这些编译错误

发布于 2024-12-05 19:20:48 字数 2606 浏览 4 评论 0原文

使用配置调试构建项目 WikitudeAPI-SCM-Test 的 WikitudeAPI-SCM-Test

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

肥爪爪 2024-12-12 19:20:48

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

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

干杯,
尼古拉斯

the Wikitude SDK only works on an actual iOS device, the simulator has no support for the camera and the necessary sensors (accelerometer, magnetometer).

Please try building and deploying on an actual iOS device, then everything should work as expected.

Cheers,
Nicolas

鹊巢 2024-12-12 19:20:48

这是一篇旧帖子,但我没有找到肯定的答案。实际上,我找到了一种方法可以在模拟器中进行编译。

首先,我使用 Wikitude 实现编辑了类(h 和 m),并使用条件:当它不是模拟器时它加载一个接口和实现,当它是模拟器时它加载另一个接口和实现:

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

示例.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

要在模拟器和设备上进行编译之间切换,您只需停用或激活当前目标的 WikitudeSDK.framework:

1) 从“Project Navigator”中选择 WikitudeSDK.framework左面板。

2) 使用右侧面板上的“文件检查器”为当前目标停用它。

这对我有用。

此致!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文