Skip to content
Prev 22870 / 398502 Next

R_NilValue blows up on Windows

There is no such problem, as R itself uses this construction repeatedly.
You are using a non-standard compiler, and also your example is incorrect,
as the recommended compiler warns.
On Thu, 22 Aug 2002, Vele Samak wrote:

            
As it should.  You have returned an unassigned pointer.  Does your
compiler not warn you about such an error?  The recommended one does:

gcc   -Ic:/R/rw1060/src/include -Wall -O2   -c foo.c -o foo.o
foo.c: In function `test1':
foo.c:6: warning: `col2' might be used uninitialized in this function
Are you sure that R_NilValue is being linked correctly?  It is an
exported variable from R.dll.  There is a caveat in `readme.packages'
about this, and it is the usual cause of such problems.
It does if linked as recommended,
What's NIL?