Discussion:
Build does not automatically includes all referenced PRGs
(too old to reply)
Demetrios Panayotakopoulos
2010-05-08 07:40:54 UTC
Permalink
Hi,

Some times, in VFP 6, I face the following problem.

When building a project, it is supposed to include automatically all
files (PRGs) that are referenced / called by others.

I once again noticed that one program, that is called from another
program was not included during building an EXE.

In the development / test environment, the problem was not appearing,
since the file was in the path, but after building and run the EXE I got
an error when the specific function was called (that it was missing).

Any ideas why that happens and how can someone be sure that all required
files will be included?

Thank you.

Demetrios, Greece
Jan Bucek
2010-05-08 08:09:26 UTC
Permalink
The same problem I have got with my function "Logging()". Althought it
is the most used (sub)program in my apps, I have all time to include it
manually in my project for it will be never included automatically. I
suspect it is caused by this I use the method of the same name in my
class used in every my app. Maybe it is your problem too?
Post by Demetrios Panayotakopoulos
Hi,
Some times, in VFP 6, I face the following problem.
When building a project, it is supposed to include automatically all
files (PRGs) that are referenced / called by others.
I once again noticed that one program, that is called from another
program was not included during building an EXE.
In the development / test environment, the problem was not appearing,
since the file was in the path, but after building and run the EXE I got
an error when the specific function was called (that it was missing).
Any ideas why that happens and how can someone be sure that all required
files will be included?
Thank you.
Demetrios, Greece
Demetrios Panayotakopoulos
2010-05-08 08:20:42 UTC
Permalink
Hi,

I have been using this function for years (is called GRUpper and
converts Greek chars to UpperCase).
In some cases this is not included and I don't recall if this was the
only one case.
I have to included it manually.

Demetrios, Greece
Post by Jan Bucek
The same problem I have got with my function "Logging()". Althought it
is the most used (sub)program in my apps, I have all time to include it
manually in my project for it will be never included automatically. I
suspect it is caused by this I use the method of the same name in my
class used in every my app. Maybe it is your problem too?
Post by Demetrios Panayotakopoulos
Hi,
Some times, in VFP 6, I face the following problem.
When building a project, it is supposed to include automatically all
files (PRGs) that are referenced / called by others.
I once again noticed that one program, that is called from another
program was not included during building an EXE.
In the development / test environment, the problem was not appearing,
since the file was in the path, but after building and run the EXE I got
an error when the specific function was called (that it was missing).
Any ideas why that happens and how can someone be sure that all required
files will be included?
Thank you.
Demetrios, Greece
Bernhard Sander
2010-05-10 09:33:54 UTC
Permalink
Hi Jan,
Post by Jan Bucek
The same problem I have got with my function "Logging()". Althought it
is the most used (sub)program in my apps, I have all time to include it
manually in my project for it will be never included automatically. I
suspect it is caused by this I use the method of the same name in my
class used in every my app. Maybe it is your problem too?
To work around this kind of problem, i always add in my projects a procedure
exteproc.prg. It contains only commands like
EXTERNAL PROCEDURE someproc
Here I include all kind of external references, that the project manager cannot
resolve. Most of them are indirect program calls like DO (lcProgName).

This procedure I reference in the main program by
EXTERNAL PROCEDURE exteproc

Regards
Bernhard Sander
Demetrios Panayotakopoulos
2010-05-10 11:26:36 UTC
Permalink
Hi Bernhard,

This is a good workaround, but you expect a new procedure that you
create and is used in your app to be included automatically.
Like forms, Bmps, Icons and all the other programs.

If you have a main.prg and define it as the main procedure, all forms ,
prgs, bmps etc will be included automatically in the project.

This problem appears rarely.

Demetrios, Greece
Post by Bernhard Sander
Hi Jan,
Post by Jan Bucek
The same problem I have got with my function "Logging()". Althought it
is the most used (sub)program in my apps, I have all time to include
it manually in my project for it will be never included automatically.
I suspect it is caused by this I use the method of the same name in my
class used in every my app. Maybe it is your problem too?
To work around this kind of problem, i always add in my projects a
procedure exteproc.prg. It contains only commands like
EXTERNAL PROCEDURE someproc
Here I include all kind of external references, that the project manager
cannot resolve. Most of them are indirect program calls like DO
(lcProgName).
This procedure I reference in the main program by
EXTERNAL PROCEDURE exteproc
Regards
Bernhard Sander
Gene Wirchenko
2010-05-10 02:11:51 UTC
Permalink
On Sat, 08 May 2010 10:40:54 +0300, Demetrios Panayotakopoulos
Post by Demetrios Panayotakopoulos
Some times, in VFP 6, I face the following problem.
When building a project, it is supposed to include automatically all
files (PRGs) that are referenced / called by others.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Post by Demetrios Panayotakopoulos
I once again noticed that one program, that is called from another
program was not included during building an EXE.
In the development / test environment, the problem was not appearing,
since the file was in the path, but after building and run the EXE I got
an error when the specific function was called (that it was missing).
^^^^^^^^^^^^^^^^^
Post by Demetrios Panayotakopoulos
Any ideas why that happens and how can someone be sure that all required
files will be included?
So which is it: file or function?

I suspect you have a function in a .prg and you never refer to
the .prg, only the function. In that case, how is VFP to know where
the function is defined? Do you have a set procedure statement that
specifies the .prg? You should.

Sincerely,

Gene Wirchenko
Jan Bucek
2010-05-10 07:11:46 UTC
Permalink
Post by Gene Wirchenko
On Sat, 08 May 2010 10:40:54 +0300, Demetrios Panayotakopoulos
Post by Demetrios Panayotakopoulos
Some times, in VFP 6, I face the following problem.
When building a project, it is supposed to include automatically all
files (PRGs) that are referenced / called by others.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Post by Demetrios Panayotakopoulos
I once again noticed that one program, that is called from another
program was not included during building an EXE.
In the development / test environment, the problem was not appearing,
since the file was in the path, but after building and run the EXE I got
an error when the specific function was called (that it was missing).
^^^^^^^^^^^^^^^^^
Post by Demetrios Panayotakopoulos
Any ideas why that happens and how can someone be sure that all required
files will be included?
So which is it: file or function?
I suspect you have a function in a .prg and you never refer to
the .prg, only the function. In that case, how is VFP to know where
the function is defined? Do you have a set procedure statement that
specifies the .prg? You should.
Sincerely,
Gene Wirchenko
In my case I use standalone (from FoxBase+ times coming) "logging.prg"
containing function Logging() and method "Logging" in "users" class. The
former I reference in code: logging(xxx, yyyy, ...), the later
oUsers.Logging(xxxx, yyy, ..). I supposed VFP can distinguish between
"logging()" and "oObject.Logging()", but it seems not to; I have allways
to add "logging.prg" into project manually.
Demetrios Panayotakopoulos
2010-05-10 11:20:31 UTC
Permalink
Hi Gene,

It's a Standalone PRG: GrUpper.prg

* GrUpper
LParameters m.Str
m.Str=...bla bla..
Return m.Str


And I call it from other PRGs or Forms
m.Str=GrUpper(m.Str)

Like every other PRG I use that way.

There is nothing wrong with that. Why the other PRGs are included? and
in other projects this prg is also included.
And as I wrote, I don't remember if this has to do with this specific
PRG, since the problem is rare.

Demetrios, Greece
Post by Gene Wirchenko
On Sat, 08 May 2010 10:40:54 +0300, Demetrios Panayotakopoulos
Post by Demetrios Panayotakopoulos
Some times, in VFP 6, I face the following problem.
When building a project, it is supposed to include automatically all
files (PRGs) that are referenced / called by others.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Post by Demetrios Panayotakopoulos
I once again noticed that one program, that is called from another
program was not included during building an EXE.
In the development / test environment, the problem was not appearing,
since the file was in the path, but after building and run the EXE I got
an error when the specific function was called (that it was missing).
^^^^^^^^^^^^^^^^^
Post by Demetrios Panayotakopoulos
Any ideas why that happens and how can someone be sure that all required
files will be included?
So which is it: file or function?
I suspect you have a function in a .prg and you never refer to
the .prg, only the function. In that case, how is VFP to know where
the function is defined? Do you have a set procedure statement that
specifies the .prg? You should.
Sincerely,
Gene Wirchenko
Loading...