ios - Open Framework: The EmptyExample app does not work in iOS8. "ld: symbol(s) not found for architecture i386" -
i started try launch open framework project in ios. however, got errors during launch example project. have no ideas how should do. appreciated.
what did:
1 download open framework ios
http://www.openframeworks.cc/versions/v0.8.4/of_v0.8.4_ios_release.zip
2 change deployment target 8.3. , launch example project
/users/zono/downloads/of_v0.8.4_ios_release/apps/myapps/emptyexample/emptyexample.xcodeproj
3 got errors below.
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 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 architecture i386 clang: error: linker command failed exit code 1 (use -v see invocation)
freeimage.a , glu-ios.a seems existed in folder.
my xcode version 6.3.1.
@jeonghopark told answer me in openframeworks's forum. worked normally.
i put code below @jeonghopark told me.
#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 gl context ofrunapp(new ofapp); }
Comments
Post a Comment