Code::Blocks Forums

User forums => Help => Topic started by: codemepls on December 27, 2015, 09:01:12 pm

Title: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: codemepls on December 27, 2015, 09:01:12 pm
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!!!!
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: codemepls on December 27, 2015, 09:01:52 pm
pics of directories
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: stahta01 on December 27, 2015, 09:26:26 pm
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.
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: codemepls on December 27, 2015, 09:35:55 pm
Yes, I did install a compiler, MinGW.  The path is d:/mingw/bin
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: stahta01 on December 27, 2015, 09:46:41 pm
Yes, I did install a compiler, MinGW.  The path is d:/mingw/bin

Read the FAQs and post a Build Log!!
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: 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!
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: stahta01 on December 28, 2015, 02:10:43 am
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.
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: oBFusCATed on December 28, 2015, 03:56:38 pm
Your compiler/linker is probably fine.

You have to remove the two folders from the linker settings shown on one of your screen shots.
Title: Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
Post by: codemepls on December 28, 2015, 10:37:05 pm
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...