News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

ld.exe cannot find ... permission denied (CB 16.01)

Started by airbournenation, November 22, 2016, 04:04:13 PM

Previous topic - Next topic

airbournenation

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:

-------------- 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



BlueHazzard

not c::b fault, but probably anti virus blocking the linker? Disable anti virus and try again...

stahta01

#2
Quote from: 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...

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

Why are these in the build log?
D:\Programs\CodeBlocks\SFML\include
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

airbournenation

Quote from: 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...
Been there, done that.


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

Jenna

Quote from: airbournenation on November 22, 2016, 07:57:45 PM
Quote from: 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...
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:

QuoteD:/Programs/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: cannot find D:\Programs\CodeBlocks\SFML\lib: Permission denied

Jenna

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).