|
Ashish Ranjan wrote:
Hi, i dont think that my g++ installation is bad. Because i have access to around 12 redhat 8 machines . And none of them compiled it with g++, tough the same stdio.h etc. errors did not occured on the same machine with gcc. AND also on these machines we have developed around 500000 lines c++ -code software for a Physical Parameter (like temperature, Humidity, Strain etc) monitoring sw package for Railways and Phramaceutical companies. And that software compiles without a hitch on these redhat 8 machines , apart from on our mandrake and slackware machines. So i donot think that the g++ installation is any problem. bye :-)
g++ (gcc version 3.2 (prerelease)) doesn't have problems with lvm.c on my cygwin installation ;-) ;-) So I will try to guess what is the problem you are experiencing. ldebug.h defines macro getline and for some reason g++ finds word getline also when doing #include <stdio.h> (I don't think that getline belongs to ANSI-C, but of course g++ is not an ANSI-C compiler when compiling in C++ mode) So these two uses conflict. I assume that the Lua team has already been thinking this since your message, but here are my suggestions. 1) change the macro name in ldebug.h to lua_getline (as this is not a public header no problems with this?) 2) move the #include <stdio.h> upwards in lvm.c so that it happens before #include "ldebug.h". Maybe right after #include "lua.h" ? Eero