<br>Also strange is I have to change the code:<br><br>-snip-<br>#ifdef gpuPMatrixRecon_EXPORTS<br>#define DllImportExport   __declspec( dllexport )<br>#else<br>#define DllImportExport   __declspec( dllimport )<br>#endif<br>
-end snip-<br><br>to <br><br>-snip-<br>#if defined(gpuPMatrixRecon_EXPORTS) || defined(cpuPMatrixRecon_EXPORTS)<br>#define DllImportExport   __declspec( dllexport )<br>#else<br>#define DllImportExport   __declspec( dllimport )<br>
#endif<br>-end snip- <br><br>Which I would totally expect except the build line for the cpuPMatrixRecon reads:<br><br>2&gt;C:/CUDA/bin64/nvcc.exe C:/Users/bdavis5/Documents/QS/QS-NIH/source/branches/trunk/source/Matlab/lib/3rdParty/Siemens/gpu/PMatrixRecon/gpuPMatrixRecon.cu -arch sm_11 --ptxas-options=-v -maxrregcount=32 -Xcompiler /EHsc,/W3,/nologo,/Od,/Zi,/MTd -m64 -DCUDADeviceProperties_DLLExport=yes -DGPU_RECON=yes -DgpuPMatrixRecon_EXPORTS -ccbin &quot;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin&quot; -DNVCC -M -o C:/Users/bdavis5/Documents/QS/QS-NIH/source/branches/trunk/build/dvip4-Win64/source/Matlab/lib/3rdParty/Siemens/gpu/PMatrixRecon/CMakeFiles/gpuPMatrixRecon_generated_gpuPMatrixRecon.cu.obj.NVCC-depend -IC:/CUDA/include &quot;-IC:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/C/common/inc&quot; -IC:/Users/bdavis5/Documents/QS/QS-NIH/source/branches/trunk/source/cpp/lib/3rdParty/Win/boost-cmake-1_41_0 -IC:/Users/bdavis5/Documents/QS/QS-NIH/source/branches/trunk/build/Windows-6.0/install/include/vtk-5.6 -IC:/Users/bdavis5/Documents/QS/QS-NIH/source/branches/trunk/build/Windows-6.0/install/include/VTKEdge &quot;-IC:/Program Files/MATLAB/R2010a/extern/include&quot; -IC:/Users/bdavis5/Documents/QS/QS-NIH/source/branches/trunk/source/Matlab/lib/3rdParty/Siemens/gpu/PMatrixRecon/. -IC:/CUDA/include<br>
....<br>...<br>...<br>2&gt;gpuPMatrixRecon.cpp<br>2&gt;..\..\..\..\..\..\..\..\..\source\Matlab\lib\3rdParty\Siemens\gpu\PMatrixRecon\gpuPMatrixRecon.cpp(37) : error C2491: &#39;gpuPMatrixRecon::recon&#39; : definition of dllimport function not allowed<br>
2&gt;CUDADeviceProperties.cpp<br>2&gt;..\..\..\..\..\..\..\..\..\source\Matlab\lib\3rdParty\Siemens\gpu\PMatrixRecon\CUDADeviceProperties.cpp(73) : warning C4267: &#39;initializing&#39; : conversion from &#39;size_t&#39; to &#39;int&#39;, possible loss of data<br>
2&gt;Generating Code...<br>2&gt;Build log was saved at &quot;file://c:\Users\bdavis5\Documents\QS\QS-NIH\source\branches\trunk\build\dvip4-Win64\source\Matlab\lib\3rdParty\Siemens\gpu\PMatrixRecon\cpuPMatrixRecon.dir\Debug\BuildLog.htm&quot;<br>
2&gt;cpuPMatrixRecon - 1 error(s), 41 warning(s)<br><br>The weird part?.... no auto define (which CMake does itself) for -DcpuPMatrixRecon_EXPORTS but instead -DgpuPMatrixRecon_EXPORTS<br><br>If I change the code to #if defined(gpuPMatrixRecon_EXPORTS) || defined(cpuPMatrixRecon_EXPORTS)  the library compiles even though in the build line only contains -DgpuPMatrixRecon_EXPORTS<br>
<br>