ios - C++ program works on command line but fails on Xcode -


i have c++ static lib uses libxml2 extensively. test using google test, means build command line executable unit tests called. command line application works , output expected.

i carry on library ios project in xcode copying source files. build , call c++ source files file .mm extension. i've set xcode's c++ language dialect c++11 , c++ standard library llvm.

to build command line pass these switches: -wno-attributes -g -wall -std=c++11 -stdlib=libc++ -wunused -d_glibcxx_use_nanosleep -m64

my problem once call ios app, crashes silently. caveman debugging nslog statements throughout code shows variables potentially null. problem exact same input crashes app on xcode not on console.

what's best way debug this?

try activate xcode memory management checks. project > scheme > edit scheme… click run item in list on left. click diagnostics.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -