11 Replies Latest reply on Aug 12, 2013 7:24 AM by heterogeneous

    Need Help

    heterogeneous

      hello there,

      i installed AMD APP SDK for windows 64 bit. the compiler compile without error when using cl.h, but when i try to compile my code that include cl.hpp header, it gives error telling me that : stdext is not declared and errors like expected primary-expression  before * and many, known that i included all opencl headers and library, so i want to know solution for this.

      best regards

        • Re: Need Help
          himanshu.gautam

          Do you see this error on SDK Samples or your own code?

          Please refer to the #defines used in sample CpluPlusWrapper (eg _NO_STD_VECTOR, CL_USE_DEPRECATED_1_1_APIs etc).

            • Re: Need Help
              heterogeneous

              Hello,

              Yes, i try many examples that uses cl.hpp and it doesn't work for windows, with the same errors (syntaxic errors, occurs when the code use classe that do not exist or note declared, so i must include or define something but i don't know...), i don't have visualbasic, i try first with eclipse and dev-c++ the compilation succeed only, when i use cl.h header. I try it on ubuntu and all work fine, but the catalyse driver on ubuntu do not switch automatically between the integrated card and the discret one, so this the reason that i use windows. For compilation, i use MinGW.

              i use the defines that you have mentionned above and still got errors.

              Thank's

                • Re: Need Help
                  himanshu.gautam

                  IIRC, there was a similar issue with CPP_cl samples on mingw. Can you try using cygwin once?

                  1 of 1 people found this helpful
                    • Re: Need Help
                      heterogeneous

                      hello,

                      i try cygwin, when you include cl.hpp header without using it, it compile without errors, but when i try the example of CplusplusWrapper.cpp i got error but not like i montionned above they have been changed like this :

                       

                      cl.hpp:867:40: error: there are no arguments to ‘alloca’ that depend on a template parameter, so a declaration of ‘alloca’ must be available.

                      Method 'what' could not be resolved    main.cpp    /testcyg    line 81    Semantic Error

                       

                      so what i can do ?

                      Thank's

                        • Re: Need Help
                          himanshu.gautam

                          Are you using APP SDK 2.8? or APP SDK 2.8.1?

                            • Re: Need Help
                              heterogeneous

                              hey,

                              I use AMD-APP-SDK-v2.8-Windows-64. I will try 2.8.1, and see again.

                              best regards.

                                • Re: Need Help
                                  heterogeneous

                                  hello,

                                  still got the same errors with version 2.8.1, i think that i waste my time for nothing, i will use directly C API rather than CPP.

                                  Thanks for help.

                                    • Re: Need Help
                                      himanshu.gautam

                                      C++ API is very helpful, and reduces a lot of bloat code. I am able to run CpluPlusWrapper, using a linux machine, and using a windows machine (using Visual Studio). I can try Mingw after installing it next week.

                                      1 of 1 people found this helpful
                                        • Re: Need Help
                                          heterogeneous

                                          hello,

                                          Ok, so i must install visual studio, is there any specific headers and libraries that comes with visual studio, and make all work fine ?

                                          regards.

                                            • Re: Need Help
                                              himanshu.gautam

                                              <<<< cl.hpp:867:40: error: there are no arguments to ‘alloca’ that depend on a template parameter, so a declaration of ‘alloca’ must be available.

                                              <<<< Method 'what' could not be resolved    main.cpp    /testcyg    line 81    Semantic Error

                                               

                                              Well, the story is that cygwin is used for testing APP SDK Samples on windows, and therefore makefiles select cl.exe instead of g++. How are you getting your error:

                                              Visual Studio as recommended in Installation notes should just work fine.

                                                • Re: Need Help
                                                  heterogeneous

                                                  hello,

                                                  I just read errors from console output, I did not really dig, now I have decided to use the C API, I seek for the CPP API to see what opencl look like (because I was beginner and I want something easy to learn), and making some performance test between CPU and GPU, but when I look closely I found that C version is more détailed so I choose to use it, for probleme of CPP version, I have switched to Ubuntu and all work fine.

                                                  thank's for sharing.