2010年9月5日星期日

setup openCL with sharpdevelop 4.0 beta


-------------step-by-step---------------

 (1)  update driver for Raedon HD5650 mobility  on Sony notebook
 you must install newest driver to support openCL First,   or it will get warning during install the Stream SDK :

Your display driver does not support GPU computation....... 




(2)    VC++2008 express can build 64bit/32bit in Gui IDE,  it is successful to build the samples for openCL !!!
choose 32bit to build,  if set "any cpu"  the build button is not activated










setup openCL with sharpdevelop 4.0 beta
-----------------------------------------------------------------
install .net framework 4.0 and SDK 7.1  and sharpdev 4.0 beta

but when I try the sharpdev 4.0 beta, I got error but solved it

 
-----------------------------------------------------------------

 


----------------- info ---------------
    .net framework 3.5sp1 runtime is needed for sharpdev 4.0
sharpdevelop can not support 64bit v++
(vc 2010 also can not support in Gui, only in command line)
----------------------------------


try to build the sample in sharpdev 4.0) , error:
"can not find windowssdkdir in the registry"



----------------regedit does not work for sharpdevelop 4-------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder=C:\Program Files\Microsoft SDKs\Windows\v6.0A
[REG_SZ]

Depending on your configuration you might have to set the variable in the user profile instead:

HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder=C:\Program Files\Microsoft SDKs\Windows\v6.0A            
[REG_SZ]


--------------------solution ---------------------------------------

I test the VC2008 express , it is fine for both 32bit and 64bit

(1)  start sdk7.1 set env, (64bit debug) 
C:\Windows\System32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
then found that error:  
You are attempting to build a Win32 application from an x64 environment.
 If using the Windows 7.1 SDK build environment, type setenv /x86 - C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\Windows7.1SDK\Microsoft.Cpp.Win32.Windows7.1SDK.targets

(2)  as prompted run : setenv /x86   then restart  sharpdevelop 4.0  
 C:\Windows\System32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"

I have tested all console app c++ program,  openCL samples with vs2010.sln.ALL Fine



make a bat to start sharpdevelop

=======================



-------------extra background reading from Google  search--------------------

Visual Studio: Fixing Broken $(WindowsSdkDir) Variable

If you get weird errors in Visual Studio that basically state files like Windows.h cannot be found, the reason may be a missing or incorrect WindowsSdkDir variable.

In my case, working with Visual Studio 2008 SP1 (32 bit) on Windows 7 x64 (64 bit) everything was fine until I installed the Windows 7 SDK. After that, no SDK files could be found any more and nothing would compile. Uninstalling the SDK (which I did not really need anyway - I had installed it only to get at XPerf) did not help. After some reasearch I found out that the Visual Studio internal variable WindowsSdkDir (which is not an environment variable) was missing from the registry. After adding the following, everything worked like a charm again:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder=C:\Program Files\Microsoft SDKs\Windows\v6.0A
[REG_SZ]

Depending on your configuration you might have to set the variable in the user profile instead:

HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder=C:\Program Files\Microsoft SDKs\Windows\v6.0A            (vc2008)
[REG_SZ]

Essentially, the configuration tool only updates the HKEY_LOCAL_MACHINE settings; Visual Studio uses the HKEY_CURRENT_USER settings in preference.



---------------------------

Windows SDK是用来支持32位和64位Windows平台以及.NET框架编程模型的开发包

这个专用控制台在运行开始竟然执行了一个批处理文件,C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat

、要在控制台中编译Win32程序,当然还得手动需设置include、lib环境变量(详细见http://blog.csdn.net/memory_xj/archive/2008/10/27/3156887.aspx),这很有点复杂,还好VS2008为我们将这些设置命令编成了vsvar32.bat文件,我们只需执行即可。

这个专用控制台在运行开始竟然执行了一个批处理文件,C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat