Author Topic: CodeBlocks on Windows LD.exe Cannot find Permission Denied  (Read 19483 times)

Offline codemepls

  • Single posting newcomer
  • *
  • Posts: 5
CodeBlocks on Windows LD.exe Cannot find Permission Denied
« 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!!!!

Offline codemepls

  • Single posting newcomer
  • *
  • Posts: 5
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #1 on: December 27, 2015, 09:01:52 pm »
pics of directories

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #2 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline codemepls

  • Single posting newcomer
  • *
  • Posts: 5
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #3 on: December 27, 2015, 09:35:55 pm »
Yes, I did install a compiler, MinGW.  The path is d:/mingw/bin

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #4 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!!
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline codemepls

  • Single posting newcomer
  • *
  • Posts: 5
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #5 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!
« Last Edit: December 27, 2015, 09:58:21 pm by codemepls »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #6 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #7 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.
(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!]

Offline codemepls

  • Single posting newcomer
  • *
  • Posts: 5
Re: CodeBlocks on Windows LD.exe Cannot find Permission Denied
« Reply #8 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...