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

some memory variable not found.

Status
Not open for further replies.

tonni

Programmer
Feb 20, 2000
11
0
0
ID
I created 2 file with ext .h
1. application.h
2. strings.h
In application.h I define variable about info of company for example: #define company_loc C & C Co.
And in strings.h I define variable about variable I'll use in the application that I builded for example :
#DEFINE UPDATETRIGFAIL_LOC "Update trigger failed!"
then I create a class and in include file for the class I include the application.h
and at header of application.h I wrote this: #Include strings.h
but when I use the class error occured and the warning is " UPDATETRIGFAIL_LOC not found"
How I solve this problem, please help me....

TONNI
uatnehc@bdg.centrin.net.id
 
ONe thing is you define constants not variables though that may be what you meant. Your company name should be enclosed in quotes in an Include file as you have above. Could your app find the Include file? Is it included in your project? You can also include Include files in the classes themselves. John Durbin
MCP Visual FoxPro
ICQ VFP ActiveList #73897253
 
thank's alot for your help, may be my explanation is not quit clearly, i'm sorry.
both in the class and my project I already include the application.h file. at top of application.h file I wrote this command : #include strings.h
and variable that does found is variable I define in strings.h file. for example :
* application.h
#include strings.h
#define company_loc "C & C Co."
...
...
*end of application.h

________________________________________
*strings.h
#DEFINE UPDATETRIGFAIL_LOC "Update trigger failed!"
...
...
*end of strings.h


__________________________________________

when I use the class the warning is "UPDATETRIGFAIL_LOC not found", but actually the variable UPDATETRIGFAIL_LOC I already define in strings.h file


TONNI
uatnehc@bdg.centrin.net.id
 
Have you tried to include the strings.h in a test class. When you use the named constant of strings.h is it than evaluated correctly ?

The case could be that strings.h cannot be found when you compile your class. If this is the case, your named constants will not be replaced by their defined values in the compiled code, creating the error message you stated.

I suggest you try making a test class and including strings.h specifically. If the error remains it means that the compiler could not find strings.h.

HTH,

Weedz (Wietze Veld)
veld4663@exact.nl

They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best.

After the GoldRush - Steve McConnell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top