首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >开放框架: EmptyExample应用程序不能在iOS8中工作。"ld:找不到体系结构i386的符号“

开放框架: EmptyExample应用程序不能在iOS8中工作。"ld:找不到体系结构i386的符号“
EN

Stack Overflow用户
提问于 2015-05-31 18:09:05
回答 1查看 160关注 0票数 0

我开始尝试在iOS中启动开放框架项目。但是,我在启动示例项目时遇到了一些错误。我不知道该怎么做。任何帮助都将不胜感激。

我做了什么:

1下载用于iOS的开放框架

http://www.openframeworks.cc/versions/v0.8.4/of_v0.8.4_ios_release.zip

2将Deployment Target更改为8.3。然后启动示例项目

/Users/Zono/Downloads/of_v0.8.4_ios_release/apps/myApps/emptyExample/emptyExample.xcodeproj

3我在下面得到了一些错误。

代码语言:javascript
复制
ld: warning: ignoring file ../../../libs/FreeImage/lib/ios/freeimage.a, missing required architecture i386 in file ../../../libs/FreeImage/lib/ios/freeimage.a (2 slices)
ld: warning: ignoring file ../../../libs/glu/lib/ios/glu-ios.a, missing required architecture i386 in file ../../../libs/glu/lib/ios/glu-ios.a (2 slices)
Undefined symbols for architecture i386:
"_fwrite$UNIX2003", referenced from:
_WriteProc(void*, unsigned int, unsigned int, void*) in freeimage.a(FreeImageIO.o-i386)
LibRaw::dcraw_thumb_writer(char const*) in freeimage.a(libraw_cxx.o-i386)
opjimage_create in freeimage.a(image.o-i386)
pngdefault_write_data in freeimage.a(pngwio.o-i386)
LibRaw::ppm_thumb() in freeimage.a(dcraw_common.o-i386)
LibRaw::jpeg_thumb_writer(_sFILE*, char*, int) in freeimage.a(dcrawcommon.o-i386)
LibRaw::write_ppm_tiff() in freeimage.a(dcraw_common.o-i386)
...
"_mktime$UNIX2003", referenced from:
LibRaw::get_timestamp(int) in freeimage.a(dcraw_common.o-i386)
LibRaw::parse_rollei() in freeimage.a(dcraw_common.o-i386)
LibRaw::parse_riff() in freeimage.a(dcraw_common.o-i386)
"_strerror$UNIX2003", referenced from:
Iex::throwErrnoExc(std::string const&, int) in freeimage.a(IexThrowErrnoExc.o-i386)
"_strtod$UNIX2003", referenced from:
pnghandle_sCAL in freeimage.a(pngrutil.o-i386)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

freeimage.a和glu-ios.a似乎存在于文件夹中。

我的Xcode是6.3.1版。

EN

回答 1

Stack Overflow用户

发布于 2015-05-31 22:21:28

@jeonghopark在openFrameworks的论坛上告诉了我答案。它工作正常。

我把这段代码放在@jeonghopark告诉我的下面。

代码语言:javascript
复制
#include "ofMain.h"
#include "ofApp.h"

extern "C"{
    size_t fwrite$UNIX2003( const void *a, size_t b, size_t c, FILE *d )
    {
        return fwrite(a, b, c, d);
    }
    char* strerror$UNIX2003( int errnum )
    {
        return strerror(errnum);
    }
    time_t mktime$UNIX2003(struct tm * a)
    {
        return mktime(a);
    }
    double strtod$UNIX2003(const char * a, char ** b) {
        return strtod(a, b);
    }
}

int main(){

    ofSetupOpenGL(1024,768, OF_FULLSCREEN);         // <-------- setup the GL context

    ofRunApp(new ofApp);
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30556201

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档