Author Topic: ld.exe cannot find ... permission denied (CB 16.01)  (Read 2712 times)

Offline airbournenation

  • Single posting newcomer
  • *
  • Posts: 2
ld.exe cannot find ... permission denied (CB 16.01)
« 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: [Select]
-------------- 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



Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2567
Re: ld.exe cannot find ... permission denied (CB 16.01)
« Reply #1 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...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6677
    • My Best Post
Re: ld.exe cannot find ... permission denied (CB 16.01)
« Reply #2 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: [Select]
D:\Programs\CodeBlocks\SFML\include
Code: [Select]
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.
« Last Edit: November 22, 2016, 04:58:27 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline airbournenation

  • Single posting newcomer
  • *
  • Posts: 2
Re: ld.exe cannot find ... permission denied (CB 16.01)
« Reply #3 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.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: ld.exe cannot find ... permission denied (CB 16.01)
« Reply #4 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

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: ld.exe cannot find ... permission denied (CB 16.01)
« Reply #5 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).