Hi,

I'm new to calling C++/C programs from R and am having some trouble getting
started.  Following Sigal Blay (Simon Fraser University)'s instructions, I
have a .c file called "useC1.c":

/* useC1.c                */

void useC(int *i) {
    i[0] = 11;
}


This produces a .o file : "useC1.o" in a specified directory.  I then open
R, set the proper directory and:


 dyn.load("useC1.o")

Unfortunately I am met with the following:

Error in inDL(x, as.logical(local), as.logical(now), ...) :
  unable to load shared library 'C:/Users/Harlan/Desktop/useC1.o':
  LoadLibrary failure:  %1 is not a valid Win32 application.


My guess is that this is due to the fact that I am running Windows Vista
with 64bit and R is built on 32bit.  Any suggestions to fix this problem ?
 Or any easier ways for someone in my situation to call  C++ from R?

Thanks,

Harlan Campbell
McGill University

	[[alternative HTML version deleted]]


