News:

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

Main Menu

CodeBlocks on Windows LD.exe Cannot find Permission Denied

Started by codemepls, December 27, 2015, 09:01:12 PM

Previous topic - Next topic

codemepls

Hi, new here but not to computing...

Ive searched on the forum and saw a few answers but still have this same problem.

Im using Windows 10, Code::Blocks 13.12 with MinGW and OpenCV...

I get the LD.exe Cannot Find Permission Denied when trying to compile a test cpp...

Here are a few screenshots of my configuration...  I also have the folders for CodeBlocks, MinGW in the environmental path as well...

Please Help!!!!


stahta01

Read the Code::Blocks FAQs and then post a Build log in Code Tags.

Did you install a Compiler?
If no, install one!
If yes, what path is it installed in?

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]

codemepls

Yes, I did install a compiler, MinGW.  The path is d:/mingw/bin

stahta01

Quote from: codemepls on December 27, 2015, 09:35:55 PM
Yes, I did install a compiler, MinGW.  The path is d:/mingw/bin

Read the FAQs and post a Build Log!!
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]

codemepls

Thanks, Ive read the FAQs from other posts and same error.  This is my build log:

mingw32-g++.exe  -Id:\opencv\build\include -I"D:\Program Files (x86)\CodeBlocks" -Id:\mingw\bin -c "C:\Users\NAME\Desktop\C Project\test1.cpp" -o "C:\Users\
NAME\Desktop\C Project\test1.o"
mingw32-g++.exe -Ld:\opencv\build\x86\mingw\build -L"D:\Program Files (x86)\CodeBlocks" -L(invalid)\lib\gcc_dll -Ld:\mingw\bin -o "C:\Users\NAME\Desktop\C Project\test1.exe" "C:\Users\NAME\Desktop\C Project\test1.o"   d:\opencv\build\x86\mingw\bin D:\MinGW\bin -lcodeblocks -lwxmsw28u_gcc_cb
d:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find d:\opencv\build\x86\mingw\bin: Permission denied
d:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find D:\MinGW\bin: Permission denied
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 2 second(s))
2 error(s), 0 warning(s) (0 minute(s), 2 second(s))

Thanks!

stahta01

Quote from: codemepls on December 27, 2015, 09:52:03 PM
Thanks, Ive read the FAQs from other posts and same error.  This is my build log:

mingw32-g++.exe  -Id:\opencv\build\include -I"D:\Program Files (x86)\CodeBlocks" -Id:\mingw\bin -c "C:\Users\NAME\Desktop\C Project\test1.cpp" -o "C:\Users\
NAME\Desktop\C Project\test1.o"
mingw32-g++.exe -Ld:\opencv\build\x86\mingw\build -L"D:\Program Files (x86)\CodeBlocks" -L(invalid)\lib\gcc_dll -Ld:\mingw\bin -o "C:\Users\NAME\Desktop\C Project\test1.exe" "C:\Users\NAME\Desktop\C Project\test1.o"   d:\opencv\build\x86\mingw\bin D:\MinGW\bin -lcodeblocks -lwxmsw28u_gcc_cb
d:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find d:\opencv\build\x86\mingw\bin: Permission denied
d:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find D:\MinGW\bin: Permission denied
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 2 second(s))
2 error(s), 0 warning(s) (0 minute(s), 2 second(s))

Thanks!

Step 1: Find out what MinGW GCC Compilers are installed on your machine!!!!
Then decide which one you are going to use in Code::Blocks.
You told me one thing in a prior post but, the log says what you said is FALSE.

Your log said Code::Blocks is set up to use an MinGW bin of "d:/program files (x86)/codeblocks/mingw/bin"
This will often NOT work if you have MinGW GCC installed in a path like "D:\MinGW\bin"

I suggest deleting or renaming one MinGW folders; and seeing if that changes the error.

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]

oBFusCATed

Your compiler/linker is probably fine.

You have to remove the two folders from the linker settings shown on one of your screen shots.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

codemepls

Thanks, seems to work okay without using OpenCV added into the linker settings... but OpenCV is required in order to compile the code...  More troubleshooting...