10-26-2009 02:04 PM
I'm having problems copying a project directory if I have the project open in CVI. If I try to copy the project (just using Windows Explorer, for example to another drive or to a mapped network location), I always get an error from Windows along the lines of:
"Cannot copy i386-mswin32-release: It is being used by another person or program.
Close any programs that might be using the file and try again."
It looks like CVI has a lock on something whenever it is open which prevents me from copying, which appears to have something to do with the .pch files in the cvibuild directories. Is there any way around this so that I don't have to completely shut down CVI to make a backup of what I'm working on? I'm using CVI 9.0.1, I don't recall running into this in previous versions of CVI. Thanks in advance!
10-26-2009 04:30 PM
10-26-2009 04:33 PM
tstanley:
I can duplicate your problem using CVI 9.01 and Windows XP Pro when I use precompiled headers.
I can copy a project directory with no problem if I don't use precompiled headers, but when I select Options >> Build Options >> Compile with precompiled include file, I get the same error.
However, the error goes away when I do the following:
Options >> Build Options, uncheck Compile with precompiled include file, click OK, then go back to Options >> Build Options, check Compile with precompiled include file, and click OK.
Somehow by checking Compile with precompiled include file (and clicking OK) and then going right back and checking Compile with precompiled include file (and clicking OK) I can now copy with no errors.
I tried this with a couple of projects that weren't originally set to use precompiled include files. When I first set it to use precompiled files, I get the error. After I uncheck it and then recheck it, I don't get the error. I don't know why.
Does that work for you?
10-27-2009 12:50 PM
tstanley and Al,
I was also able to reproduce this issue and I'll be working with our developers to figure out what the problem is and see if a bug report needs to be filed. Tstanley, if you apply the same workaround that Al suggested (of unchecking "Compile with precompiled include file", clicking OK, then rechecking it) does this also get around the issue you are seeing? It did so for me, but I just wanted to confirm that you were able to copy the directory after this workaround as well.
10-27-2009 02:09 PM - edited 10-27-2009 02:11 PM
10-29-2009 03:27 PM
tstanley,
I found that the reason this file is locked down is because the development environment has a hold on that file for updating it when you update your code. Unchecking the box which disables the precompiled headers option releases that lock and checking it again doesn't lock the file again right away. So this is expected behavior and either of the options presented (unchecking/checking the option before copying, or just not copying the output directory) should do what you need.