Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

error on compiling the chord program

Help
2007-02-11
2013-01-18
  • Hi. I want to use the online songbook.
    On ubuntu 6.06 I got an error I don't understand. See --

    me@pavlov:~/songbook/chord$ make
    gcc -DUS -g   -c -o common.o common.c
    gcc -DUS -g   -c -o xpose.o xpose.c
    gcc -DUS -g   -c -o iso.o iso.c
    gcc -DUS -g   -c -o chord.o chord.c
    gcc -DUS -g   -c -o grid.o grid.c
    gcc -DUS -g   -c -o toc.o toc.c
    g++ -DUS -g -c -o sortscripture.o sortscripture.c
    g++ -DUS -g -o chord common.o xpose.o iso.o chord.o grid.o toc.o sortscripture.o
    chord.o: In function `process_file':/home/me/songbook/chord/chord.c:1897: undefined reference to `errno'
    collect2: ld returned 1 exit status
    make: *** [chord] Error 1
    me@pavlov:~/songbook/chord$
    Can anyone help me learn this and get it to compile?

     
    • Jonathan Daley
      Jonathan Daley
      2007-02-20

      This question was answered by the author over private email:

      >>>>>>>>>>>>>

            Wait a sec! Googled errno and discovered http://www.opengroup.org/onlinepubs/009695399/functions/errno.html
            on a whim I tried adding #include < errno.h> and removed extern int errno;