Pages: [1]   Go Down
Author Topic: "AP_Var has not been declared'  (Read 1191 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm having problems troubleshooting a program for my Ardupilot Mega. I've tried certain methods to overcome this problem but to no avail.


This it the error message I keep getting :

In file included from /AP_Compass_HIL.h:4,
                 from AP_Compass_HIL.cpp:12:
Compass.h:47: error: 'AP_Var' has not been declared
Compass.h:47: error: expected `)' before 'key'
Compass.h:125: error: 'AP_Var_group' does not name a type
Compass.h:126: error: ISO C++ forbids declaration of 'AP_VarS' with no type
Compass.h:126: error: expected ';' before '<' token
Compass.h:127: error: ISO C++ forbids declaration of 'AP_VarS' with no type
Compass.h:127: error: expected ';' before '<' token
Compass.h:128: error: 'AP_Float' does not name a type
In file included from AP_Compass_HIL.cpp:12:
AP_Compass_HIL.h:8: error: 'AP_Var' has not been declared
AP_Compass_HIL.h:8: error: expected `)' before 'key'



Does anyone know of a way to correct this problem?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49048
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All the messages refer to the same file which you did not post or even provide a link to.

Quote
Does anyone know of a way to correct this problem?
Yes. But it requires that you share more information.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

These are the two files I have problems with.

Is there anything else that I can provide you with?

* Compass.h (5.16 KB - downloaded 11 times.)
* AP_Var.h (34.04 KB - downloaded 12 times.)
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49048
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there anything else that I can provide you with?
Yes. Either all the files in the library and sketch folder, or a link to the library.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am having the same issue with this file that i downloaded and have not changed i have jsut tryed to compile it to make sure i have all the necessary libraries and ended up with this error after commenting (out the packet.param5 ==1)if statement in the GCS_Mavlink tab ihttps://code.google.com/p/arducopter/downloads/detail?name=ArduCopter-2.9.1-rc1.zip&can=2&q= off the arducopter code page, i an new at arduino i have a little experience in processing, with generative design but nothing on this level.
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4231
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What we need is a sketch that recreates problem code based solely on the error messages received or a mindreader() function
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49048
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
based solely on the error messages received
Solely on "a snippet of", you mean.
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4231
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Based solely on the thread subject would be even better.  We could test it on this one http://arduino.cc/forum/index.php/topic,145824.0.html
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Pages: [1]   Go Up
Jump to: