Gcc Error 53
Re: Link error 53 From: San Saeteurn
Re: Link error 53 From: Segher Boessenkool
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or http://stackoverflow.com/questions/13703397/any-way-to-print-gcc-ld-error-detail posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes https://blogs.gnome.org/mortenw/2014/01/27/gcc-vs-clang-for-error-messages/ a minute: Sign up Any way to print gcc ld error detail up vote -2 down vote favorite I want to add a library to my code. so when I compile it, I use -l option. but gcc terminate with gcc error ld error. I even try to use pkg-config to generate gcc flags, but these flags are still not working. So, I think I need a solution to get the real information about this error, how can I make gcc to print ld error details? other compiler like clang++ can do this work is OK, too. gcc share|improve this question asked Dec 4 '12 at 12:53 user994785 61 You really should show us the error, and possibly the failing gcc command gcc error 53 (or the Makefile rules triggering it). –Basile Starynkevitch Dec 4 '12 at 13:02 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote ld is part of binutils, and accept many options. Maybe you want to pass --verbose to it. gcc is running ld and also has link options. Pass -v to gcc to get the exact ld command it is running. Maybe you should link with gcc -v -Wl,--verbose share|improve this answer answered Dec 4 '12 at 12:58 Basile Starynkevitch 123k895202 Thank you! This tips works. Though the output is still not very readable. Finally, I find my problem comes from missing of library. –user994785 Dec 4 '12 at 14:05 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged gcc or ask your own question. asked 3 years ago viewed 212 times active 3 years ago Related 465What is the difference between g++ and gcc?2Does gcc work when the wrapper is a different version than the platform-specific binary?4gcc compilation flag98GCC compile error with >2 GB of code1644Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)?-1GCC technical details0Error Compiling gcc-4.7.2273Why
debate flamed up again. I thought I would deliver my few cents too. It is claimed from time to time that clang has more helpful error messages. It is, in my opinion, a clain that is just plain wrong. They both stink. Let's look at a few samples:
static int foo (int a, int b) { return a + b; }
int bar (int a) { return foo (a (4 + 1) * 2); }
gcc says (excerpts):
e1.c:2:33: error: called object ‘a’ is not a function or function pointer
e1.c:2:1: error: too few arguments to function ‘foo’
clang says (excerpts):
e1.c:2:33: error: called object type 'int' is not a function or function pointer
The best thing you can say about the error messages here is that they at least point you to the right location. gcc is a tad better by virtue of printing the second error message which at least hints of the real problem, but neither compiler tell us what the problem is: "missing comma". It looks like clang is suppressing the second and further errors on a line. Note, however, that in this case it has suppressed the more informative error. Moving on with a missing opening parenthesis:
static int foo (int a, int b) { return a + b; }
int bar (int a) { return foo a); }
From gcc we get the wisdom
e2.c:2:19: warning: return makes integer from pointer without a cast [enabled by default]
e2.c:2:30: error: expected ‘;’ before ‘a’
e2.c:2:31: error: expected statement before ‘)’ token
while clang produces
e2.c:2:26: warning: incompatible pointer to integer conversion returning
'int (int, int)' from a function with result type 'int' [-Wint-conversion]
e2.c:2:29: error: expected ';' after return statement
I don't see that one set of utter nonsense is better than the other and spending time colour coding the output shows a dubious set of priorities. Clang would do well to add hyphens to "pointer to integer". How about this?
#include
#define EMIT(c) fprintf(stderr,"%c",(c))
Nothing from gcc, nothing from clang, nothing from sparse. Yet it's a clear vi