cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

tumanovalex
Journeyman III

Error in my example and examples SDK ATI

Visual Studio Express 2008, video card GeForce 9500GT ? Athlon X2, ATI Stream SDK v2.0 Beta . Simple program:
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <CL/cl.hpp>
#include <windows.h>
int main(int argc, char argv[]) {
cl_uint num_platforms;
cl_int npl;
SetConsoleOutputCP(1251);
npl = clGetPlatformIDs(0, NULL, &num_platforms);
if(npl != CL_SUCCESS) {
printf("\nNumber error clGetPlatformIDs = %i\n", npl);
_getch();
exit(1);
}
_getch();
return 0;
}
get error on clGetPlatformIDs: " Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." Same the errors appears for any examples from SDK ATI (HelloCL, BinarySearch...). In what 
there can be an error? My project on http://slil.ru/28334278, there can be somebody will try on the your PC?

0 Likes
3 Replies
genaganna
Journeyman III

Originally posted by: tumanovalex Visual Studio Express 2008, video card GeForce 9500GT ? Athlon X2, ATI Stream SDK v2.0 Beta . Simple program: #include #include #include #include #include int main(int argc, char argv[]) { cl_uint num_platforms; cl_int npl; SetConsoleOutputCP(1251); npl = clGetPlatformIDs(0, NULL, &num_platforms); if(npl != CL_SUCCESS) { printf("\nNumber error clGetPlatformIDs = %i\n", npl); _getch(); exit(1); } _getch(); return 0; } get error on clGetPlatformIDs: " Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." Same the errors appears for any examples from SDK ATI (HelloCL, BinarySearch...). In what  there can be an error? My project on http://slil.ru/28334278, there can be somebody will try on the your PC?

 

 

Tumanovalex,

                  I am able to run your program without any problem.  It seems you have both Nvidia and ATI OpenCL libraries.  Make sure it picks appropriate library when you are running programs.

 

 

0 Likes

Thanks big, I will try.

0 Likes

Really, I in a directory system32 had library OpnCL.dll from Nvidia. Thanks for detailed explanations!

0 Likes