title: Compiling Eigen library with nvcc (CUDA)
body: <p>I tried to compile following program (main.cu) with the nvcc (CUDA 5.0 RC):</p>
  
  <pre><code>#include &lt;Eigen/Core&gt;
  #include &lt;iostream&gt;
  
  int main( int argc, char** argv )
  {
      std::cout &lt;&lt; "Pure CUDA" &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Unfortunately, I get a bunch of warnings and errors I can only explain using nvcc instead of the Microsoft compile. </p>
  
  <p>Is this assumption right?
  Is there any way to compile Eigen with nvcc? (I actually don´t want to transfer Eigen matrices to the GPU, just access their members)?</p>
  
  <p>If it should not work to compile Eigen with nvcc, is there a nice guide/tutorial about clever ways to seperate host and device code?</p>
  
  <p>I am using CUDA 5.0 RC, Visual Studio 2008, Eigen 3.0.5. To compile the .cu file I used both, the rules file included in CUDA, aswell as the custom build step produced by CMake. Using the CUDA rule file, I targeted the build at compute capability 3.0.</p>
  
  <p>Thanks for your advice.</p>
  
  <p>PS: If I compile the same code with the host compiler it works perfectly.</p>