Solved

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

Posted on 2003-12-04
3
304 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now