Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include files and constants?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00041459
Message ID:
00041599
Views:
33
>I have an include file with some constants. In particular, MSG_ERROR is defined in this include file. I have a form class. In the form class I include that include file. I create a form based on the formclass. Some of the code in the form is "WAIT WINDOW MSG_ERROR". When this code is encountered I get, "Variable 'MSG_ERROR' is not found." I figured I forgot to compile everything. So, I did that. Same error. Perhaps the include file needs to be in the form also? I did that and recompiled everything. Same error. This is rather odd and I'm stymied on what to do next.

Hey Michael,
What a coincidence! I've just ran into this same problem couple of days ago for some weird reason and I couldn't understand why because I also had "included" the header in the form AND the base class. Well, my solution was perhaps more weird. What I did, as almost a last restort was to:
1. Open the form in design mode.
2. Clear the Include statement altogether.
3. Save the form.
4. Reopen the form.
5. Include the same exact header file again.
6. Save the form again.
7. Run the app/form and now no silly error message.
I don't know if this is a bug since I've never ran into this problem before but above is how I've solved it. Try it and I hope it works for you too.

John
It's "my" world. You're just living in it.
Previous
Reply
Map
View

Click here to load this message in the networking platform