help whith c compiler on my ipod

Discussion in 'iOS Development' started by pelta, Apr 16, 2009.

  1. pelta

    pelta New Member

    Joined:
    Nov 16, 2007
    Messages:
    2
    Likes Received:
    0
    hi! im new at this of programing and im having some problems...
    i am using the iPhone OS C/C++ Compiler - by pH
    i have downoaed all the necesary files from cidia,i go to Terminal an i type compiler to go to de copiler... once i have written my program:
    #include <stdio.h>
    int main()
    {
    printf("Hola Mundo!");
    return 0;
    }

    i save it whit the name prueba.c
    yhen i go to exit ad it asks me to enter the name i saved whith the nano, so i write prueba.c
    then it asks me for the desired name for the final executable, so i write prueba.c again
    then it less me to press C and enter if i want it to so i do it and it throws me this erros:
    /urs/bin/ld: can't locate file for: -lstdc++
    collect2: ld returned 1 exit status
    ./minimal/mapping.h(54): _assert(2:false)

    does anyone knows what im doing rong?

    thanks
  2. NolesFans

    NolesFans New Member

    Joined:
    Sep 23, 2008
    Messages:
    404
    Likes Received:
    0
    Device:
    iPod touch
    which command you uses for compiling?
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    looks possibly like you're using g++ to compile(unnecessary here, use gcc), and there is a broken symlink to that library.
  4. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    You're saving your executable file as a .c file. Instead, name it prueba without an extension.
  5. faydor

    faydor New Member

    Joined:
    Oct 16, 2010
    Messages:
    1
    Likes Received:
    0
    Hi

    when I compiled the c program it throws me an error saying g++ missing.
    Do i need to install anything?
    help please


    Thanx in advance

Share This Page