Greetings to everyone!
Recently, I wanted to compile one of my C applications, using the built-in gcc from the command line.
I got the following error:
>>gcc da.c
"
dyld: lazy symbol binding failed: Symbol not found: _NXOpenFile
Referenced from: /usr/libexec/gcc/darwin/ppc/cpp-precomp
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _NXOpenFile
Referenced from: /usr/libexec/gcc/darwin/ppc/cpp-precomp
Expected in: /usr/lib/libSystem.B.dylib
gcc: Internal error: Trace/BPT trap (program /usr/libexec/gcc/darwin/ppc/cpp-precomp)
Please submit a full bug report.
See <URL:
http://developer.apple.com/bugreporter> for instructions.
"
What can be wrong?
I have OS X 10.5.8 (Intel), I use XCode ver. 3.0 and C code in XCode compiles just fine. When I run gcc -v, it reports the following:
"
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1151, based on gcc version 3.1 20020420 (prerelease)
"
It seems like it wants to use version 3.1, not 4.0. I typed in gcc_select, but only valid options are 2/3, which by what I think maps to gcc2/gcc3. Where is gcc4 gone?
How can I correct this? I really want to use the terminal version, not just xcode IDE.
I will try to upgrade to Xcode 3.13, but what if that does not solve the problem.
Thank you for your help.