Code::Blocks Forums

User forums => Help => Topic started by: airbournenation on November 22, 2016, 04:04:13 pm

Title: ld.exe cannot find ... permission denied (CB 16.01)
Post by: airbournenation on November 22, 2016, 04:04:13 pm
Hi,
compiling an SFML template produces some hard-to-fix errors. Judging by them, I think it's CB's fault, not SFML's.

Build log:
Code
-------------- Clean: Debug in test (compiler: GNU GCC Compiler)---------------

Cleaned "test - Debug"

-------------- Build: Debug in test (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall D:\Programs\CodeBlocks\SFML\include -DSFML_STATIC -g -DSFML_STATIC -ID:\Programs\CodeBlocks\SFML\include -c C:\Users\...\SFML\test\main.cpp -o obj\Debug\main.o
mingw32-g++.exe: warning: D:\Programs\CodeBlocks\SFML\include: linker input file unused because linking not done
mingw32-g++.exe -LD:\Programs\CodeBlocks\SFML\lib -o bin\Debug\test.exe obj\Debug\main.o  D:\Programs\CodeBlocks\SFML\lib  -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d -lsfml-main-d -lopengl32 -lgdi32 -lwinmm -lfreetype
D:/Programs/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: cannot find D:\Programs\CodeBlocks\SFML\lib: Permission denied
D:\Programs\CodeBlocks\SFML\lib/libsfml-graphics-s-d.a(Sprite.cpp.obj): duplicate section `.rdata$_ZTVN2sf8DrawableE[__ZTVN2sf8DrawableE]' has different size
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 2 warning(s) (0 minute(s), 0 second(s))

Info:
Windows 7 64 bit w/ administrator permissions
CB's FAQ on compiler errors was checked and all suggested actions were carried out (http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors))
SFML folder has full R/W permissions


Title: Re: ld.exe cannot find ... permission denied (CB 16.01)
Post by: BlueHazzard on November 22, 2016, 04:52:13 pm
not c::b fault, but probably anti virus blocking the linker? Disable anti virus and try again...
Title: Re: ld.exe cannot find ... permission denied (CB 16.01)
Post by: stahta01 on November 22, 2016, 04:56:28 pm
not c::b fault, but probably anti virus blocking the linker? Disable anti virus and try again...

That is possible; but, I am thinking user error.

Why are these in the build log?
Code
D:\Programs\CodeBlocks\SFML\include
Code
D:\Programs\CodeBlocks\SFML\lib

I suggest removing them! Note: Keep the ones prefixed with -I or -L
Edit: This means keep the search paths; get rid of the extra spots.

Tim S.
Title: Re: ld.exe cannot find ... permission denied (CB 16.01)
Post by: airbournenation on November 22, 2016, 07:57:45 pm
not c::b fault, but probably anti virus blocking the linker? Disable anti virus and try again...
Been there, done that.


@stahta01 you really thought I was falling for this :D? Think again. This produces "cannot find" errors.
Title: Re: ld.exe cannot find ... permission denied (CB 16.01)
Post by: Jenna on November 22, 2016, 09:07:42 pm
not c::b fault, but probably anti virus blocking the linker? Disable anti virus and try again...
Been there, done that.


@stahta01 you really thought I was falling for this :D ? Think again. This produces "cannot find" errors.
Think again and read what you quoted:

Quote
D:/Programs/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: cannot find D:\Programs\CodeBlocks\SFML\lib: Permission denied
Title: Re: ld.exe cannot find ... permission denied (CB 16.01)
Post by: Jenna on November 22, 2016, 09:29:56 pm
I just tried it on win10, the access denied error is exactly what you get (on windows), if you try to link to a folder (as you do).