linux makefile linking error __line__
I am getting the following error in Linux "undefined reference to __line__. I know that C has implicit macro __LINE__. In code __line__ is assigned with __LINE__ as
extern int __line__; ( variable name is in small letters but just same as macro which is in captial letters)
LDF(__line__ = __LINE__);
so __line__ is a variable not macro here which is assigned with value of __LINE__. Here it is extern int, so it should have been declared somewhere as just int __line__. But am not seeing any header or c file where _line_is declared. Also this error am getting not during compilation of .c file but while linking of .o files.
This error is not coming in UNIX. Additionally while linking libgen, libposix4 libraries are linked. These libraries are present only in UNIX not in LINUX I assume that int __line__; is present somewhere in these libraries or how can i resolve this error?
|