title: Compile CUDA (.cu) file into a shared object (.so) using Ubuntu
body: <p>I'm a big newbie to all things code, but I need to run an LBA in Rstudio. In order to run the code, I must transform a file (lba-math.cu) into a shared object file (lba-math.so). The code to do this in a bash terminal is given for me:</p>
  <pre><code>nvcc -O2 -arch sm_35 -I/usr/include/R -Xcompiler &quot;-fpic&quot; -c lba-math.cu -o lba-math.o
          nvcc -arch sm_35 -shared -L/usr/local/lib64 lba-math.o -o lba-math.so
  </code></pre>
  <p>However, when I run this command (I am using Ubuntu from a Windows computer), I get the error: <code>&quot;gcc: no such file or directory&quot;</code>.</p>
  <p>The instructions for running the LBA that provided this code say that: &quot;The library locations in the above lines may need to be changed on your own system, depending on the
  install location for R.&quot;</p>
  <p>I, however, have no idea how to change the library locations because I can't read this code very well.</p>
  <p>My current R location is in C:\Users\tessc\OneDrive\2014\Documents</p>
  <p>The current location for the lba-math.cu file is in C:\Users\tessc\OneDrive\2014\Documents\Work\LBA Official Code.</p>
  <p>Does anyone have any idea how I might re-write this code?</p>