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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Functions at design time

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I am re-creating an app from back ups, following a hardware failure. The app is running ok but I am getting the following error during compilation.
Code:
    Unknown REGFN - Undefined
    Unknown CALLFN - Undefined
Foxtools.fll is registered in the startup program of the app and the functions work ok in the app itself but I have to click ignore to get it to compile.
I assume the error is caused by the functions not being registered at the time of compilation but is there a way round this error?


Keith
 
Keith,

I assume the error is caused by the functions not being registered at the time of compilation but is there a way round this error?

You assume correct.

The easiest solution is to execute SET LIBRARY from the command window just before you build the app.

Alternatively, add an EXTERNAL LIBRARY command to your code, at the top of each of the files where the FLL function is called.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks Mike
It is not really a problem to click ignore at compilation it just looks a bit better if the bill payers are looking over my shoulder and not seeing errors.



Keith
 
That's a good point Mike Y.
I have
Code:
SET LIBRARY TO ("z:\foxtools.fll") ADDITIVE
in my 'start program' but it is ignored at compilation time.
Where should I put the command so the compiler can include it?


Keith
 
Keith,

... it is ignored at compilation time.

Are you also executing a CLEAR ALL anywhere? If so, that will clear the SET LIBRARY.

Another possibility (much less likely, I admit) is that you are executing another SET LIBRARY somewhere downstream, without an ADDITIVE clause.

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I have a reindex routine which runs each time the server is restarted and that closes and clears everything apart from the drains, so that is the cause.
I hadn't sussed that but makes sense when considered.
I think I'll leave it for now as only 2 'errors' show at compilation and I only change this app occasionally.
Thanks for the advice though.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top