Can't Build Exe in VFP9

Building an exe is hanging for one particular project in VFP9 on Windows 7, 64 bit.
I can build exes for other projects on this machine (a standalone).
The build also fails with the same project folder on another machine with another installation of VFP9.
The freeze seems to happen after the menu is built, (or during).
I copied the menu from an earlier, successful build and got the same failure. Then I copied the PJX and PJT files from the earlier build and got the same failure. After the failure, I try building other projects--no problem.
All the forms open successfully.
I build exes quite frequently for these projects with no issues, so I'm stumped!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It is hard to tell what's wrong without access to your project files...

You have several options:
1) Try to build the project when VFP runs as Administrator. You should also check the option "Recompile all files"
2) Record the Project build log - simply open the debugger window and build your project. All log messages are in the Debugger Output window and you should be able to identify the problematic component.
3) Create a new empty project and place just the main PRG (or SCX) and menus into it and try to build it. It should then populate the project with almost all necessary files.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Olaf DoschkeSoftware DeveloperCommented:
Any phenomenon? EXE size is much smaller than usual?

Last time I had a build problem and just recently a colleague, it was OLEPUBLIC classes. So look into Project Inof in the Servers tab, whether it shows info on some ole public classes you have in your project.

If you do, you normally can build runas Admin, the EXE or DLL just doesn't get registered but since some time you need to runas admin to get the normal build result, if an ole public class is included.

Bye, Olaf.
terrypba1Author Commented:
Thanks Olaf. I keep things extremely simple in my projects, nothing to register. This module uses the same classes as the others (accounting project) and the others build okay. It is the largest module, the exe is 3.5 meg, but nothing has been added to it since the last build. (Just thought I'd rebuild it to get a current date on it)
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

What says the build output log? What says the last message in the log?
If you think the menu is the cause then try to generate the menu outside the project. Is it possible?
terrypba1Author Commented:
Things are looking good now.
The project err file was telling me it was compiling the menu.
But also gave an error that ccNull had already been defined. It has been that way for several years, but I took care of that. Then it couldn't find foxpro.h, which also hasn't moved for years. I do occasionally get that error message (as opposed to the build hanging). I just rebuild and it's happy. I played with renaming the menu, and removing a ccNull definition, and some combination of steps has fixed things.
But I'm curious? How would I generate the menu outside of the project?
So it works. Great!

The menu is generated automatically during the project build and...
When you are modifying the menu in Menu manager then you may select the Generate... option from the "Menu" menu prompt and it will call the genmenu.prg and does the work (generates .MPR file) as if it were built in the project.
Olaf DoschkeSoftware DeveloperCommented:
If you have prgs with #include statement it can be important you CD into the right folder to be able to build or at least have all .h files in SET PATH.

The VFP help says:
Specifies the name of the header file that is merged into the program during compilation.

You can include a path with the header file name. When you include a path with the header file name, Visual FoxPro searches for the header file only in the specified location.

If you do not include a path with the header file name, Visual FoxPro searches for the header file in the default Visual FoxPro directory, and then along the Visual FoxPro path. The Visual FoxPro path is specified with SET PATH.

In my experience relative paths in a #INCLUDE don't work relative from the prg file, but from the current path, so you better only use full or no path and instead add all paths with header files to SET PATH.

What works easier is header files in class libs, they are stored as relative path from the vcx and processed this way.
Yes, and it helps having a good hierarchy of files, especially with #INCLUDES in header files.

Bye, Olaf.
terrypba1Author Commented:
Thanks Olaf--I'll doublecheck my use of INCLUDE and SET PATH.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.