<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>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 "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin" -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 "-IC:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/C/common/inc" -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 "-IC:/Program Files/MATLAB/R2010a/extern/include" -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>gpuPMatrixRecon.cpp<br>2>..\..\..\..\..\..\..\..\..\source\Matlab\lib\3rdParty\Siemens\gpu\PMatrixRecon\gpuPMatrixRecon.cpp(37) : error C2491: 'gpuPMatrixRecon::recon' : definition of dllimport function not allowed<br>
2>CUDADeviceProperties.cpp<br>2>..\..\..\..\..\..\..\..\..\source\Matlab\lib\3rdParty\Siemens\gpu\PMatrixRecon\CUDADeviceProperties.cpp(73) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data<br>
2>Generating Code...<br>2>Build log was saved at "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"<br>
2>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>