0
votes

The following code crashes in an Xcode created template project.

int main(int argc, char *argv[]) 
{
    uint64_t t64 = 100000;
    double s = (double)t64; // Crash!
    ...

The crash is accompanied with the following console output and occurs on a 2.2.1 device but not on 3.0.1 devices. It occurs both compiling for Thumb or ARM.

dyld: lazy symbol binding failed: Symbol not found: ___floatundidf
Referenced from: /var/mobile/Applications/15E9DC65-324D-4C3A-8477-DC8CFFA67DC1/MyApp.app/MyApp
Expected in: /usr/lib/libgcc_s.1.dylib

dyld: Symbol not found: ___floatundidf
Referenced from: /var/mobile/Applications/15E9DC65-324D-4C3A-8477-DC8CFFA67DC1/MyApp.app/MyApp
Expected in: /usr/lib/libgcc_s.1.dylib

The problem only occurs with a Base SDK of 3.0, compiling for 2.2.1 is fine. Unfortunately I have 3.0 enhancements.

2

2 Answers

0
votes

When you say it works on one iPhone project and not another, are you compiling the same code with different settings? If so I'd check to see what settings differ between the two to shed light on what might be at the root of the problem.

___floatundidf should be part of libgcc so it might be missing in the ARM version of that libary for the 2.2.1 SDK but present in 3.0.1 (hence the crash in the former but not the latter). You can use the nm tool to check for its existence in both. If it is missing from 2.2.1 you should file a bug with Apple.

0
votes

It works if you do. Weird

   int main(int argc, char *argv[]) {
    uint64_t t64 = 100000;
    double s = (double)(uint64_t)t64; // Crash!
    ...