I installed code::blocks and GNU GCC + SDK Stream (Open GL) exactly as described in tutorial "Playing with OpenCL: Gaussian Blurring" by Lefteris. Why I cannot compile using spaces in path to library when the author Lefteris could? The SDK Stream path is unchangeble:

C:\Program Files\AMD APP 

. When I try GCC sees it like


... and generates errors. Any solution for this? I am using Windows XP.

2 Answers 2


Try putting quotes around the segments with spaces in the GCC CMD line argument, e.g.,

C:\"Program Files"\"AMD APP"\... 


"C:\Program Files\AMD APP\..."

No quotes help in any form. This is nothing to do with spaces but with length of the file name. Compiler sees it as old MS-DOS in form of 8 characters as for name of file and 3 characters for extension. Any longer file name/folder must be renamed.

Solution: 1. go to the directory you need to get the real name of Create link to command.com; working path filed stays empty 2. submit 3. run command.com in the folder 4. in command prompt type dir 5. select the text and copy it to clipboard by enter 6. edit the text as needed and paste it to the Code::Block Here are examples of my paths:


(shortcut for C:\Program Files\AMD APP\lib\x86\OpenCL.lib )


(shortcut for W:\___NEW_PROJECTS\GaussianBlur\Gaussian_with_OpenCL\refu.dll)

So now it works and errors disappear. I hope this helps to others.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.