This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Format of ld error message


 > Current versions of the linker now produce this message:
 > 
 >    myprint.o: In function `myprint':
 >    /.../myprint.c:3: undefined reference to `mysquare6'
 > 
 > The "/.../" in the above message is the absolute path to the myprint.c 
 > source file.  I have compressed it here because in my case that was a 
 > very long path.

That looks good to me.  Thanks!

 > > PS cc -v -g myprog.c myprint.o gives:
 > > myprint.o: In function `myprint':/home/nickrob/myprint.c:3: undefined reference to `mysquare6'
 > 
 > The only difference between the current output and the version you are 
 > seeing appears to be a newline after the first colon.  This does make 
 > the second line of the output conform to most of the error message 
 > specification:
 > 
 >    PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE
 > 
 > The only thing that is missing is the program name.  Is this an 
 > essential component for emacs ?

No, it's optional.  Normal output, e.g, from the compiler, looks like this:

SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE

I mentioned PROGRAM because I thought it could be used for the object file
name.  However, using two lines means it's not needed, and I think this
approach is cleaner too.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]