link step fails with "Access denied" [solved]

General questions regarding the usage of CodeLite
gopalvenu
CodeLite Enthusiast
Posts: 10
Joined: Wed Sep 07, 2011 8:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

link step fails with "Access denied" [solved]

Post by gopalvenu »

Running CodeLite+mingw4.4.1

Everything running fine on one PC - I moved my projects to another PC, and installed the same toolchain there, but when building the executable, the link step fails somewhere in the makefile snippet below

$(OutputFile): $(IntermediateDirectory)/.d ..\..\workspaces\vpg-default\.build-debug\cfc $(Objects)
@$(MakeDirCommand) $(@D) <---- succeeds
@echo "" > $(IntermediateDirectory)/.d
@echo $(Objects) > $(ObjectsFileList)
$(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions) <---- never gets here

Fails with the error

mingw32-make.exe[1]: Entering directory .........
Access is denied.
minfw32-make.exe[1]: *** [outputfile] Error 1
mingw32-make.exe: *** [All] Error 2

I checked all the file/directory permisions on both the toolchain and my source code and they are fine (note that it even created the output directory successfully). Problem may be in the two @echo lines..

Prior to getting stuck here, it compiles all the .cpp files and before that it compiles and builds a static library successfully.
The problem occurs only when lining to create an executable. The g++ -o outputfile ... log line never shows up
gopalvenu
CodeLite Enthusiast
Posts: 10
Joined: Wed Sep 07, 2011 8:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: link step fails with "Access denied" [solved]

Post by gopalvenu »

Solved the problem:
- I deleted the project from the workspace (without deleting the files)
- removed any intermediate directories (such as <projectname>./Debug)
- remove the <projectname>/project.mk and the <projectname>/project.txt files in
the top level directory (kept the <projectname>.project file)
- readded the project back into the workspace (using the <projectname>.project file)

Everything works fine now.
spaces
CodeLite Veteran
Posts: 67
Joined: Mon Aug 22, 2011 10:15 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: link step fails with "Access denied" [solved]

Post by spaces »

Just ran into this today while moving a project from winXP to win7. To clear this up: you need to remove ./Release and ./Debug immediate directories.

I think the "Build/Rebuil Project" should delete these dirs.
Post Reply