[Question] How to get gcc working on iphone 5s

iphone
support

#1

iv jailbroken my iphone 5s ios 7.1.2 (11D257)
iv installed gcc and a fake ios libgcc but gcc wont compile a simple program

program code:

    #include <stdio.h>
    int main()
    {
        printf("hello\n");
        return 0;
    }

and the terminal output is:

Altha:/Developer/files/Kurome root# gcc -all_load -v -I /var/include main.c -o  $myprograms/Kurome
Using built-in specs.
Target: arm-apple-darwin9
Configured with: ../llvm-gcc-4.2/configure --build=x86_64-unknown-linux-gnu --host=arm-apple-darwin9 --enable-static=no --enable-shared=yes --prefix=/usr --localstatedir=/var/cache/iphone-gcc --enable-languages=c,c++,objc,obj-c++ --enable-wchar_t=no --with-gxx-include-dir=/usr/include/c++/4.0.0
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5555)
 /usr/libexec/gcc/arm-apple-darwin9/4.2.1/cc1 -quiet -v -I /var/include -D__DYNAMIC__ main.c -fPIC -fno-builtin-strcat -fno-builtin-strcpy -quiet -dumpbase main.c -maspen-version-min=2.0 -auxbase main -version -o /var/tmp//ccl6u37r.s
ignoring nonexistent directory "/usr/lib/gcc/arm-apple-darwin9/4.2.1/../../../../arm-apple-darwin9/include"
#include "..." search starts here:
#include <...> search starts here:
 /var/include
 /usr/local/include
 /usr/lib/gcc/arm-apple-darwin9/4.2.1/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
GNU C version 4.2.1 (Based on Apple Inc. build 5555) (arm-apple-darwin9)
        compiled by GNU C version 4.2.1 (Based on Apple Inc. build 5555).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64634
Compiler executable checksum: 7f3b3f9f41787e32b9fcd64c73e06ffd
 as -arch arm -force_cpusubtype_ALL -o /var/tmp//ccZzCD7r.o /var/tmp//ccl6u37r.s
 /usr/libexec/gcc/arm-apple-darwin9/4.2.1/collect2 -dynamic -arch arm -force_cpusubtype_ALL -all_load -aspen_version_min 2.0 -weak_reference_mismatches non-weak -o /Kurome -lcrt1.10.5.o -L/usr/lib/gcc/arm-apple-darwin9/4.2.1 -L/usr/lib/gcc/arm-apple-darwin9/4.2.1 -L/usr/lib/gcc/arm-apple-darwin9/4.2.1/../../.. /var/tmp//ccZzCD7r.o -lgcc_s.10.5 -lgcc -lSystem
ld: library not found for -lSystem
collect2: ld returned 1 exit status
Altha:/Developer/files/Kurome root#

but i dont know how to set the ISystem directory in gcc or disable it
i know that it activates from the -I arg but i cant get rid of it becouse the system headers are in '/var/include’
so what am i suposed to do ???


(Not a N00b, but still learning) #2

@all/moderators:
Maybe this is better suited for the support category?

Best, SmartOne


(system) #4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.