ld: warning: cannot find entry symbol _start, not setting start address
/usr/lib/libc.so: undefined reference to ‘environ’
/usr/lib/libc.so: undefined reference to ‘__progname’
Which library am I missing here? libc? Huh? Isn’t that automatically added? Even if I add -lc, I still get this error.
Suggestions?
jide
November 15, 2001, 4:12am
2
i think for environ to declare it at extern variable at the first line of the source (before the include); but i don’t remember its type, sorry.
wrote you soon for next.
Well, I actually got around this by making a make file for 10-20 lines of crude code.
jide
November 19, 2001, 1:55am
4
Well, for environ, if i remember correctly:
extern char* environ;
before all # instructions (first line, what).
i don’t know __progname, sorry.
system
Closed
October 19, 2021, 6:58pm
5
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.