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!
terrypba1Asked:
Who is Participating?
 
pcelbaCommented:
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.
0
 
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.
0
 
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)
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
pcelbaCommented:
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?
0
 
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?
0
 
pcelbaCommented:
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.
0
 
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:
FileName
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.
0
 
terrypba1Author Commented:
Thanks Olaf--I'll doublecheck my use of INCLUDE and SET PATH.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.