1

Having trouble getting these two arguments to play nice when compiling a project. Any help would be much appreciated.

-gcc_flags "-L${ProjectDir} -lflite -all_load" -nosymbolstrip -nostrip -cxx -gcc_flags " -lgcc_eh -L${ProjectDir} -ltestflight -ObjC"

flite is a native C library, while TestFlight is a Obj-C library. Any idea how to make them play nice together?

The lflite library was working great, then I went to add TestFlight and things went sideways. The solution compiles but crashes on start up with:

Sep 30 15:40:18 Dev-iPhone UIKitApplication:com.cognitopia.scando[0x2e64][3288] <Notice>: Native stacktrace:

Sep 30 15:40:18 Dev-iPhone UIKitApplication:com.cognitopia.scando[0x2e64][3288] <Notice>:   0   ScanDo                              0x005f9770 mono_handle_native_sigsegv + 412

Sep 30 15:40:18 Dev-iPhone UIKitApplication:com.cognitopia.scando[0x2e64][3288] <Notice>:   1   ScanDo                              0x005c9788 mono_sigsegv_signal_handler + 360

Sep 30 15:40:18 Dev-iPhone UIKitApplication:com.cognitopia.scando[0x2e64][3288] <Notice>:   2   libsystem_c.dylib                   0x34f3172f _sigtramp + 42

Sep 30 15:40:18 Dev-iPhone UIKitApplication:com.cognitopia.scando[0x2e64][3288] <Notice>:   3   ScanDo                              0x005c93f0 mono_jit_runtime_invoke + 2800
Charles
  • 50,943
  • 13
  • 104
  • 142
Rick
  • 483
  • 1
  • 6
  • 19

2 Answers2

1

Try:

-gcc_flags "-force_load ${ProjectDir}/libflite.a -lgcc_eh -force_load ${ProjectDir}/libtestflight.a -ObjC" -nosymbolstrip -nostrip -cxx
jstedfast
  • 35,744
  • 5
  • 97
  • 110
0

Merge both arguments and use --force_load since it apply only to the provided library, instead of --load_all which affects all libraries (and could play tricks with libgcc_eh.a or libtestflight.a). That would give something like:

-nosymbolstrip -nostrip -cxx -gcc_flags "-L${ProjectDir} -lflite -force_load ${ProjectDir}/libflite.a -lgcc_eh -ltestflight -ObjC"

Also it's been reported that using the testflight SDK requires using the LLVM compiler option.

poupou
  • 43,413
  • 6
  • 77
  • 174