I am trying to configure project according this tutorial:
http://blog.refu.co/?p=663
I have set linking to
C:\Program Files\AMD APP\lib\x86\OpenCL.lib
and
W:\___NEW PROJECTS\GaussianBlur\Gaussian_with_OpenCL\refu.dll
libraries
Compiler Search folder to:
C:\Program Files\AMD APP\include\CL
and Search directories Linker folder to
C:\Program Files\AMD APP\lib\x86\
Now I run this code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
And I got these errors:
||=== Build: Debug in Gaussian_with_OpenCL (compiler: GNU GCC Compiler) ===|
Files\AMD||No such file or directory|
Files\AMD||No such file or directory|
PROJECTS\GaussianBlur\Gaussian_with_OpenCL\refu.dll||No such file or directory|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
Why the path is incorrect and does not correspond with the data saved in form?
Code::Blocks v13.12 running on Windows XP
Edit:
After I added quotes I have these errors:
mingw32-g++.exe -L"C:\Program Files\AMD APP\lib\x86\" -o bin\Debug\Gaussian_with_OpenCL.exe obj\Debug\main.o -lOpenCL "C:\Program Files\AMD APP\lib\x86\OpenCL.lib" -lrefu.dll "C:\Program Files\AMD APP\lib\x86\OpenCL.lib" "W:\___NEW PROJECTS\GaussianBlur\Gaussian_with_OpenCL\refu.dll"
mingw32-g++.exe: error: Files\AMD: No such file or directory
mingw32-g++.exe: error: APP\lib\x86\OpenCL.lib -lrefu.dll C:\Program: Invalid argument
mingw32-g++.exe: error: Files\AMD: No such file or directory
mingw32-g++.exe: error: APP\lib\x86\OpenCL.lib W:\___NEW: Invalid argument
mingw32-g++.exe: error: PROJECTS\GaussianBlur\Gaussian_with_OpenCL\refu.dll: No such file or directory
I have linked dll library:
W:\___NEW~1\GAUSSI~1\GAUSSI~2\refu.dll
but when I try to build I got error:
||=== Build: Debug in Gaussian_with_OpenCL (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lrefu.dll|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
The file really exists:
W:\___NEW~1\GAUSSI~1\GAUSSI~2>dir
28.08.2014 20:41 <DIR> .
28.08.2014 20:41 <DIR> ..
28.08.2014 12:55 <DIR> bin
28.08.2014 16:12 1 707 Gaussian_with_OpenCL.cbp
28.08.2014 16:56 224 Gaussian_with_OpenCL.depend
28.08.2014 20:25 139 Gaussian_with_OpenCL.layout
24.11.2013 20:14 117 main.cpp
28.08.2014 12:55 <DIR> obj
31.08.2012 14:47 216 347 refu.dll
Why the compiler does not see complete path?
ObFuscate:
I did not decided to install the path as AMD did.
I did not saved yesterdays project. Maybe the error disappeared, when I corrected it today. Im not sure. But new error here now, but this one is different.
mingw32-g++.exe -Wall -fexceptions -g -c W:\___NEW_PROJECTS\GaussianBlur\GaussianBlur\main.cpp -o obj\Debug\main.o
W:\___NEW_PROJECTS\GaussianBlur\GaussianBlur\main.cpp:2:19: fatal error: CL/cl.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I try include:
#include <CL/cl.h>
and the path in configuration is:
C:\PROGRA~1\AMDAPP~1\include
in Search directory - compiler
jens:
thanks for correction
Right now I am having this error:
mingw32-g++.exe -LC:\PROGRA~1\AMDAPP~1\lib\x86\ -o bin\Debug\Gaussian_with_OpenCL.exe obj\Debug\main.o -lOpenCL "C:\Program Files\AMD APP\lib\x86\OpenCL.lib" -lrefu.dll C:\PROGRA~1\AMDAPP~1\lib\x86\OpenCL.lib W:\___NEW~1\GAUSSI~1\GAUSSI~2\refu.dll
p:/programy/programování/codeblocks_32bit/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lrefu.dll
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
But I cannot find out why it says that it cannot find the path with refu.dll because when I copy the path: W:\___NEW~1\GAUSSI~1\GAUSSI~2\refu.dll and try to open, so Windows can find the file... What am I doing wrong?
Edit:
I see the path "Program Files":
-lOpenCL "C:\Program Files\AMD APP\lib\x86\OpenCL.lib"
but why it is there? It should not to be like that when I configureted the project to 8.3 file names
What is this "C:\Program Files\AMD APP\lib\x86\OpenCL.lib"?
Why are you specifying full paths to the libraries?
I don't. I have specified:
"C:\PROGRA~1\AMDAPP~1\lib\x86\OpenCL.lib"
so why compiler gets different file name?