User forums > Help

Why I got Error - "No such file or directory"?

<< < (3/4) > >>

BlueHazzard:
Firs of all: this is a problem with spaces... You are now simply using the old ( i dont know the right name) short ms names. You woul it heave more easy if you copy your files in a path without spaces.... But if you choose the hard way good luck...

To your library problem: in the project build options you have to select your build target on the left. Then go to the linker tab. On the left side called "libraries" add only the name of the library, without extension an a path.
On the tab search directories add the path to the directory where the library is located, without the library name.

Greetings.

Ps. The only log we need is the "full build log" not the build mesages...

Vuki:

--- Quote from: wever on August 29, 2014, 02:03:12 pm ---Right now I am having this error:

--- Code: ---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))
--- End code ---

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?

--- End quote ---

"-lrefu.dll" is wrong. Try either "refu.dll" or "-lrefu".


--- Quote from: wever on August 29, 2014, 02:03:12 pm ---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

--- End quote ---

You have left a full path somewhere in your project. Open the cbp file in text editor and you'll find it.


--- Quote from: wever on August 29, 2014, 02:03:12 pm ---I don't. I have specified:
"C:\PROGRA~1\AMDAPP~1\lib\x86\OpenCL.lib"

--- End quote ---

You have also specified "-lopencl". This is redundant, you are trying to link to opencl.lib twice.

EDIT:
I've just checked that my compiler version 4.8.1 handles paths with spaces without problems (I'm on Win8 though). Try upgrading your compiler - google for TDM MinGW.

wever:
Ok, I have edited the file. When I write just refu as the link so this is still not working

mingw32-g++.exe -Wall -fexceptions -g -IC:\PROGRA~1\AMDAPP~1\include -IC:\PROGRA~1\AMDAPP~1\include -c W:\___NEW_PROJECTS\GaussianBlur\Gaussian_with_OpenCL\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LC:\PROGRA~1\AMDAPP~1\lib\x86\ -o bin\Debug\Gaussian_with_OpenCL.exe obj\Debug\main.o   C:\PROGRA~1\AMDAPP~1\lib\x86\OpenCL.lib -lrefu.dll C:\PROGRA~1\AMDAPP~1\lib\x86\OpenCL.lib -lrefu
p:/programy/programování/codeblocks_32bit/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lrefu.dll
p:/programy/programování/codeblocks_32bit/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lrefu

What's that:
../lib/gcc/mingw32/4.7.1/../../../../
this is not path which C::B installed. My path is:
P:\PROGRAMY\programování\CodeBlocks_32bit\MinGW\bin
How got it there?

I'll update the compiler tomorrow

This is my project file:
http://paste.ofcode.org/37ZnaeyJ87ttY5zAFbWYsHj

oBFusCATed:

--- Quote from: wever on August 30, 2014, 01:05:30 am ---What's that:
../lib/gcc/mingw32/4.7.1/../../../../

--- End quote ---
Internal path to the linker. It is not interesting. The error message after it is the one that you should look at!


--- Quote from: wever on August 30, 2014, 01:05:30 am ---I'll update the compiler tomorrow

--- End quote ---
Probably it won't help... the problem is not caused by your compiler...

The best thing you can try is to learn how to compile your project from the command line...
Search for tutorials, read the gcc's manual about -I, -l and -L...
Without clear understanding what these options do you'll always suffer!

Jenna:
Add the search paths for linker and compiler in the appropriate tabs, use the button with the "..." to add them.
Try it without 8.3-notation.
Add the libs just once (either per target or per project) in the library tab.
Add them without ending, without a probable prefix ("lib") and without -l or whatever.
Maybe you should create a new empty project from scratch to get  rid of incorrect stuff.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version