• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Development Question: ".Rsrc could not be opened"

equant

6502
Using Think pascal 4, I get the error ... "project.Rsrc could not be opened. It may be missing or in use by another project" This never happens the first time I run a project., only the 2+nth time.

If I open the project, build and run, it works, but if I then try to run it again, or make a change and then build and run again, I get the error.

Some projects never have this problem and always work.

Anyone know what I'm missing? I can't find any difference between the projects that work and the ones that don't work that would create this issue.

Thanks for any insight.

Nathan

 
I presume the file exists given that it works the first time. So the reason must be the file is "in use". I'm not familiar with the mechanism THINK Pascal uses to run programs inside its own environment, but my immediate suspicion is that you are failing to properly clean up some resource, so that the resource file (project.rsrc) remains open after the program exits.

 
but my immediate suspicion is that you are failing to properly clean up some resource, so that the resource file (project.rsrc) remains open after the program exits.
That was my fear. I was hoping it was just some compiler option or something I needed to un/check. I'm having this issue with Peter Lewis' finger source code example as well, so I hope I can even find the issue. Seems like he would've cleaned up correctly.

If I build the application, and run it as an app, it runs over and over just fine.

Ok, well I'll keep looking. It's making the dev cycle very slow, because I have to close the project and re-open it between test-runs.

Thanks for the reply,

Nathan

 
Back
Top