Ld: warning: cannot find entry symbol _start, not setting start address?

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?

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.

Well, for environ, if i remember correctly:

extern char* environ;

before all # instructions (first line, what).

i don’t know __progname, sorry.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.