Results 1 to 7 of 7

Thread: Unable to get line number of error line in ubuntu terminal

  1. #1
    Join Date
    Aug 2013
    Beans
    10

    Post Unable to get line number of error line in ubuntu terminal

    Hy all;

    I am using ubuntu 10.04 where when i compile my programme i get only column no.where error lies and hence unable to locate the column no.as line number is absent.PLz guide me its stopping me from debugging my code.
    NB:Usually errror is specified by both line number and column number.

  2. #2
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Unable to get line number of error line in ubuntu terminal

    You would probably need to give more information. What language and what compiler are you using?

  3. #3
    Join Date
    Aug 2013
    Beans
    10

    Re: Unable to get line number of error line in ubuntu terminal

    I am doing Socket programming using c.
    Compiler information:
    ii gcc 4:4.4.3-1ubuntu1 The GNU C compiler
    ii gcc-4.4 4.4.3-4ubuntu5 The GNU C compiler
    ii libprotoc5 2.2.0a-0.1ubuntu1 protocol buffers compiler library
    ii protobuf-compiler 2.2.0a-0.1ubuntu1 compiler for protocol buffer definition file

  4. #4
    Join Date
    Sep 2008
    Location
    Chicago
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Unable to get line number of error line in ubuntu terminal

    Post a sample of the error info you get.
    In working with *nix...There be dragons. Newcomers: I recommend reading Linux is Not Windows (http://linux.oneandoneis2.org/LNW.htm) and The Linux Command Line (http://www.linuxcommand.org/tlcl.php) before beginning your quest for a better OS.

  5. #5
    Join Date
    Aug 2013
    Beans
    10

    Re: Unable to get line number of error line in ubuntu terminal

    Quote Originally Posted by whitesmith View Post
    Post a sample of the error info you get.
    like this
    serverprct.c: In function ‘main’:
    serverprct.c:76: error: expected declaration or statement at end of input
    here column no.76 given as error.but which line ? i need this infotmation.how to get it.PLease

  6. #6
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Unable to get line number of error line in ubuntu terminal

    Moved to Programming Talk

  7. #7
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,003
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: Unable to get line number of error line in ubuntu terminal

    What makes you think the '76' is a column number? It's a line number... But since the message is telling you the compiler expected more stuff, it may be the number of the line it was trying to read and didn't find, ie, one line after your final line. Typically you are missing a closing brace higher in the file.
    Last edited by ofnuts; October 18th, 2013 at 08:28 AM.
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •