(Gopi Subramanian) wrote in message news:<. com>...
> I am porting a c++ source from suse linux to windows,and my code does
> a lot of binary file manipulation, during a debug session found that
> NULL values are different in VC ++ and g++, VC++ defines NULL as 0 and
> g++ defines it as a (void *) 0, is there any way to make sure that
> both of them matches ?
I ran into this problem before. It's not the GNU compiler.
As long as you have a *.cpp file, it should compile against the
version that defines NULL as 0.
If you have a C file (*.c) then it will compile against the (void*)0
definition.
If you're getting this from a *.cpp file, more then likely your
compiler is pointing to the wrong set of header files.
This could happen if the GNU compiler was installed incorrectly, or if
you have your make file redirecting the search path for the includes
in the wrong directory.
Look for your -I options, and make sure they're correct.