Solved

....\Tables.cpp(1615) : error C2065: 'gIdle' : undeclared identifier

Posted on 2003-12-04
3
312 Views
Last Modified: 2010-04-02
Hi,
When trying to make a build from C++ source code I get the following message:
Compiling resources...
Compiling...
blah...
.
.
.
blah...
....\Tables.cpp(1615) : error C2065: 'gIdle' : undeclared identifier

'gIdle' IS declared somewhere in the beginning of Tables.cpp. Besides, this is strange because I got a large chunk of code which is SUPPOSED to pass compilation without any problem.

Short project history: What happened is I got the source code and got access to large databases that interface header files can be found in. But the project files RGui.dsp and RGui.dsw were missing information, so I had to build the links myself pointing to the paths where the needed header files are located. When now building, it no longer tells me files are missing, but rather gives me the above **undeclared identifier** message.

Any help will be much appreciated,
Giora
0
Comment
Question by:gimozes
3 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 250 total points
ID: 9878900
>> 'gIdle' IS declared somewhere in the beginning of Tables.cpp

The fact that you say "somewhere" indicates that you are not sure where.  You will need to track down the declaration and be 100% certain that it is declared.  I'll wager that it is declared in a .h file that is not #included at the top of Tables.cpp

That coulkd happen in the case you describe.  The original project dsw could have specified a particular INCLUDE path and your default INCLUDE path is bringing in a different version of the .H that provides the declaration.  Use the IDE's 'Search in Files' to locate all references to that variable.  That usually shakes loose problems like these.

Another thing that can happen:  
It is possible for the precompiled header to get out of date in a few strange circumstances.  But that is eacy to fix:  Do a Clean before the Bild.  I assume you've done that, but It's worth mentioning.

One other common problem:  You may have mispelled it!
    gIdle looks a lot like
    gldle which looks a lot like
    gldIe and so forth.

-- Dan
0
 
LVL 5

Expert Comment

by:migoEX
ID: 10364877
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept DanRollins's comment as answer.

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

migoEX
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maze travler 6 62
C++ Language error 28 242
operator overload: incompatible type and too many params 5 82
FMX TCameraComponent Problem 2 82
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question