Why does assert simply terminate a program compiled for iPhone?

前端 未结 4 1885
-上瘾入骨i
-上瘾入骨i 2020-12-24 09:54

I\'m debugging a heavily assert()\'ed iPhone app (Xcode, Objective-C++, and device simulator). In some cases, the assert failure would just terminate the app, instead of bre

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 10:06

    One time I saw a different behavior from the assert() calls once. It was caused by the compiler picking up different macro definitions at different portions of the build process.

    Once the include paths were straightened out, they all worked the same.

提交回复
热议问题