Mike Yearwood
Toronto, Ontario, Canada
Versions des environnements
Network:
Windows 2008 Server
>Attempting to compile the latest change and build a new .EXE, I received Error 1202: Program is too large. Help says there is a 65K limit on single procedure or program, but provides no way to identify which file.
>
>The previous build of the executable did not throw the error, despite the .EXE being 23 MB. and ADIR() showing half a dozen .PRGs and two .FXPs over 65K.
>
>The most likely culprit was split into two files, but the error persists. VFP 9 is available in development but cannot be used for deployment yet. I'm attempting to use this as a push to move to VFP 9, but for now, I need a VFP 6 solution to the problem.
>
>Chris.
Hi Chris
You must have made changes since the last exe to a set of programs. Those are the ones to look at first. If you use source control, you can find all recent changes. If you're not using source control... look into it. :)
I know you can handle this in VFP 9 by setting PROGCACHE, but I would advise you to break the habits that led you to this point first.
I've been advocating not using any procedure libraries for a long time. I recommend you stop doing ...
You probably already SET PATH to find the proclib.prg. Although you might also be hard-coding the path into your program. That's not a good plan.
MAIN.PRG
SET PROCEDURE TO PROCLIB.PRG && This will be required at design time and at runtime.
DO PROC1
DO PROC2
RETURN
PROCLIB.PRG
PROCEDURE PROC1
BLAH
BLAH
ENDPROC
PROCEDURE PROC2
BLAH
BLAH
ENDPROC
and do this instead...
Continue to SET PATH to the folder where the PROCLIB.PRG was. Break out one or more of the procedures from the proclib as shown below.
This path is only required at design time. The EXE will not need the path at runtime.
MAIN.PRG
DO PROC1
DO PROC2
RETURN
PROC1.PRG
BLAH
BLAH
PROC2.PRG
BLAH
BLAH
Look at the savings already. No ENDPROC, No SET PROCEDURE TO calls. The only SET PATH you might want at runtime is to the data folders. Everything included in the project is immediately accessible throughout the entire program. The exe really is the ultimate proclib.
I'm also a big advocate of creating smaller very reusable prgs. That way you can't easily build a single procedure that compiles to over 65K. Worse yet, suppose the procedure library that is giving you problems is shared by two exes. In the one exe the particular procedure is used. In the other it is not. Now neither exe will build.
HTH
Mike
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement