First, let me say that i am not vastly experienced in using Visual Studio 2010 (c++), nor have i any experience what-so-ever in terms of using OpenCL. So please be gentle
I am attempting to compile and build the Stream v2.2 SDK samples, using Visual Studio 2010. I have a FirePro V4800 and i believe this only supports OpenCL 1.1 at present, hence using v2.2 of the SDK. I am running Windows 7 64 bit Enterprise.
However, when i attempt to build the samples (this is the VS 2010 solution), i get an error that says:
Cannot open include file 'd3dx10.h': No such file or directory
This is the directX header, so i've added the directX sdk include directory to the VC++ include directories.
Then, when trying to rebuild, I'm met with 4 errors, all of the form:
cannot convert parameter 2 from 'LPCWSTR' to 'LPCSTR'
So - i've then added UNICODE to the preprocessor definitions. This is where i get stuck......... with the following errors:
Error 19 error LNK1120: 18 unresolved externals G:\ATI\Samples\\samples\opencl\bin\debug\x86_64\SimpleDX10VS10.exe SimpleDX10VS10
Error 17 error LNK2019: unresolved external symbol __imp_CreateWindowExW referenced in function main G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 7 error LNK2019: unresolved external symbol __imp_DefWindowProcW referenced in function "__int64 __cdecl MsgProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?MsgProc@@YA_JPEAUHWND__@@I_K_J@Z) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 10 error LNK2019: unresolved external symbol __imp_DispatchMessageW referenced in function "public: virtual int __cdecl SimpleDX10::run(void)" (?run@SimpleDX10@@UEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 12 error LNK2019: unresolved external symbol __imp_PeekMessageW referenced in function "public: virtual int __cdecl SimpleDX10::run(void)" (?run@SimpleDX10@@UEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 8 error LNK2019: unresolved external symbol __imp_PostQuitMessage referenced in function "__int64 __cdecl MsgProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?MsgProc@@YA_JPEAUHWND__@@I_K_J@Z) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 18 error LNK2019: unresolved external symbol __imp_RegisterClassExW referenced in function main G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 1 error LNK2019: unresolved external symbol __imp_SetWindowTextW referenced in function "public: int __cdecl SimpleDX10::render(void)" (?render@SimpleDX10@@QEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 14 error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function "public: virtual int __cdecl SimpleDX10::run(void)" (?run@SimpleDX10@@UEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 11 error LNK2019: unresolved external symbol __imp_TranslateMessage referenced in function "public: virtual int __cdecl SimpleDX10::run(void)" (?run@SimpleDX10@@UEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 16 error LNK2019: unresolved external symbol __imp_UnregisterClassW referenced in function main G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 13 error LNK2019: unresolved external symbol __imp_UpdateWindow referenced in function "public: virtual int __cdecl SimpleDX10::run(void)" (?run@SimpleDX10@@UEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 9 error LNK2019: unresolved external symbol D3D10CreateDeviceAndSwapChain referenced in function "public: int __cdecl SimpleDX10::initializeDX10(void)" (?initializeDX10@SimpleDX10@@QEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 15 error LNK2019: unresolved external symbol D3DX10CreateEffectFromFileA referenced in function "public: virtual int __cdecl SimpleDX10::run(void)" (?run@SimpleDX10@@UEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 4 error LNK2019: unresolved external symbol D3DXMatrixMultiply referenced in function "public: int __cdecl SimpleDX10::render(void)" (?render@SimpleDX10@@QEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 5 error LNK2019: unresolved external symbol D3DXMatrixRotationX referenced in function "public: int __cdecl SimpleDX10::render(void)" (?render@SimpleDX10@@QEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 3 error LNK2019: unresolved external symbol D3DXMatrixRotationY referenced in function "public: int __cdecl SimpleDX10::render(void)" (?render@SimpleDX10@@QEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 2 error LNK2019: unresolved external symbol D3DXMatrixScaling referenced in function "public: int __cdecl SimpleDX10::render(void)" (?render@SimpleDX10@@QEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
Error 6 error LNK2019: unresolved external symbol D3DXMatrixTranslation referenced in function "public: int __cdecl SimpleDX10::render(void)" (?render@SimpleDX10@@QEAAHXZ) G:\ATI\Samples\samples\opencl\cl\app\SimpleDX10\SimpleDX10.obj SimpleDX10VS10
If somebody could point me to a tutorial, or knows what project settings i need to use, that would be fantastic. I've also tried including all the library directories and include directories i can think of, but this doesn't seem to fix it. So for now, i'm stuck!
Solved! Go to Solution.
Hi,jazpearson
Your version of Opencl is 1.1, so I think there is no need to install the latest driver. But your SDK is too old , you can try v2.6.
Thank you.
Hi,jazpearson
Your version of Opencl is 1.1, so I think there is no need to install the latest driver. But your SDK is too old , you can try v2.6.
Thank you.
Can you also added the directX sdk lib directory to the VC++ lib directories. This should fix the problem.
Are you able to build all other samples except SimpleDX10?
Can you try with VS08 if possible?
Thanks very much for the help guys.
I added in the directX lib files too, but was still having problems. So i downloaded the v2.6 SDK and added in the directX include and lib folders and it all built properly.
Much appreciated.