ios - Can't compile plcrashreporter in Xcode 4 -
i can use prebuilt framework provided on plcrashreporter project page when compiling device, not simulator. have same problem described here.
i assume prebuilt framework not support simulator's architecture, downloaded out plcrashreporter source. opened xcode project , selected crashreporter-ios-simulator > iphone 4.3 simulator
target. when try build project, error:
libtool: unknown option character `d' in: -d__iphone_os_version_min_required=30000
i same error when try build of other targets (such device).
my next step try adding source files project. no longer have aforementioned problem; however, error when try compile:
fatal error: 'crash_report.pb-c.h' file not found [2] #import "crash_report.pb-c.h" ^ 1 error generated. command clang failed exit code 1
the crash_report.pb-c.h
file mentioned in error message not exist; i've searched plcrashreporter source tree , internet. therefore, have assume file supposed generated somehow, cannot figure out how.
(commenting out line in plcrashreport.m on crash_report.pb-c.h
included results in numerous other compilation errors.)
you correct in file not exist normally, nor crash_report.pb-c.c
exist, next error after one.
the crash_report.pb.h
, crash_report.pb.c
files generated @ compile time through build rule. need add custom script build process make them.
first, make sure have protoc-c in plcrashreporter folder of project (plcrashreporter-1.0/dependencies/protobuf-2.0.3/bin/protoc-c
). buried deep. script running.
then find crash_report.proto
file. main input protoc-c
using create missing files. can take directory , put manually script, or can make rule run script on every *.proto
file. latter.
then edit build rules include script runs protoc-c
flag --c_out="${derived_files_dir}"
, crash_report.proto
file 2 inputs, output crash_report.pb-c.h
, crash_report.pb-c.c
same directory crash_report.proto file is, should accessible in project.
the build rules in xcode 4 (and above) under project's target's build rules tab. add build rule before other build rules. here's mine looks in xcode:
you'll have fiddle directory
Comments
Post a Comment