Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Project File can't Find .PRG's

Status
Not open for further replies.

jsams

Programmer
Aug 22, 2000
73
0
0
US
I have a visual foxpro project which specifies 6 programs (.prg's) that are referenced by the class librarys.

When I try to build the project it says it can't find the 2 of the .prg's, so I do a locate, find them and click on them and it comes back and asks if I want to locate, ignore, or cancel again. Never does satisfy.

I can click on the .prg's in the project and it will show them correctly pathed! I can double click and it will bring them up in the editor and allow me to edit them.

I can do a right click in the project window, bring up the "Project Info" and they are both in the files window. Yet, they seem to be invisible to the project when I try to rebuild the project or create the EXE.

I have tried both removing and deleting from project and sub-dir, reinstalling to the sub-dir, and then re-adding them to the project without success.

Can anyone shed any light on what is going on with the project?

Thanks in advance,
John
 
Hi John,

I'd have thought what you tried would have worked. You could put SET PROCEDURE TO Whatever.prg ADDITIVE for the six files in your main.prg to see if that will make it go away.

Regards,

Mike
 
Hi mike,

Actually that is what is causing the problem. I have the two modules referenced with SET PROC ... ADDITIVE in the INIT sections of the classes. The project "knows" it needs them but can't seem to resolve them, even when pointed at them.

The project was created on another machine using a slightly different sub-dir path. I was able to redirect everything but these two ".prg's" and resolve the new locations.

Now here is the real kicker. On the original machine (where the project was originally created), when the project is compiled it gets the same error on these two modules, but if you continue the build and EXE is created that runs OK. On my machine, I get and "OLE" error and the EXE is not created.

I may try to rebuild the project from scratch to see if that works.

Thanks,
John
 
Well I solved one piece of the puzzle. I searched thru posts and found a similar error re: "OLE Error" trying to create an EXE was related to having duplicate class modules in project and I did. I am now able to create a EXE that runs, but I am still puzzled why VFP insists it can't find the two .prg modules.

John
 
Hi John,

Could you be dealing with a name conflict? I have seen some really bizarre things happen when I've used a reserved name.

Regards,

Mike
 
Hi Mike,

No, its definitely not a name conflict. Both module names are unique and used in other, similar projects without a problem.

John
 
A couple things to try...

1. SET PROCEDURE TO MYPRG ADDITIVE && Without the .prg extension

2. SET DEFAULT TO (ADDBS(JUSTPATH(SYS(16)))) && Do this before the set procedure to command

3. SET PATH TO "C:\MyProject;C:\MyProject\Progs" && or whatever your project and subdirs are - this is assuming that the prgs aren't compiled into your project, and do this before your set procedure to

...I'm not entirely sure what is going on for you, but the above should give you a few things to play with and perhaps a solution to your problem.

boyd.gif

 
Thanks for the ideas Craig, gave them a try but it didn't resolve the errors. On a hunch I made the following change to the SET PROC statement in the two classes that the error was being reported in:

SET PROC TO myprog1.spr, myprog1.prg, myprog2.prg ADDITIVE

to the following:

SET PROC TO myprog1.spr ADDITIVE
SET PROC TO myprog1.prg ADDITIVE
SET PROC TO myprog2.prg ADDITIVE

I now get a clean compile and the compiled EXE still works. Go figure. The more I work with this stuff the more ......

Thanks,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top