Build Error
Closed this issue · 4 comments
Hi,
when i try to compile the code i get following error:
D:\Git\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter.ino: In function 'void setXAxis(void*)':
G27_Pedals_and_Shifter:246:3: error: 'G27' was not declared in this scope
G27.setXAxis(input->axis);
^~~
D:\Git\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter.ino: In function 'void setYAxis(void*)':
G27_Pedals_and_Shifter:251:3: error: 'G27' was not declared in this scope
G27.setYAxis(input->axis);
^~~
D:\Git\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter.ino: In function 'void setZAxis(void*)':
G27_Pedals_and_Shifter:256:3: error: 'G27' was not declared in this scope
G27.setZAxis(input->axis);
^~~
D:\Git\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter.ino: In function 'void setButtonStates(int*, int)':
G27_Pedals_and_Shifter:392:5: error: 'G27' was not declared in this scope
G27.setButton(i, LOW);
^~~
G27_Pedals_and_Shifter:396:5: error: 'G27' was not declared in this scope
G27.setButton(gear - 1, HIGH);
^~~
G27_Pedals_and_Shifter:401:5: error: 'G27' was not declared in this scope
G27.setButton(buttonTable[i], buttons[i]);
^~~
D:\Git\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter.ino: In function 'void loop()':
G27_Pedals_and_Shifter:747:3: error: 'G27' was not declared in this scope
G27.sendState();
^~~
exit status 1
'G27' was not declared in this scope
I cloned your repo and tried to build it on master branch...
The G27 symbol is declared here: https://github.com/n-e-y-s/G27_Pedals_and_Shifter/blob/master/G27_Pedals_and_Shifter/src/G27PedalsShifter.h
There must be something wrong in your arduino build environment. Maybe an outdated version?
Thanks for the quick reply.
I also suspect an outdated ide. now he is giving me another error.
In file included from D:\Git\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter\G27_Pedals_and_Shifter.ino:9:0:
d:\users\frank\appdata\local\temp\arduino_build_129833\sketch\src\g27pedalsshifter.h:30:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]
#warning "Using legacy HID core (non pluggable)"
I will close this issue, due my own incompetence and will install a fresh new version of arduino ide.
Thanks
Good luck, if you keep having problems, feel free to contact me again.
I deleted following Folders:
C:\Program Files (x86)\Arduino
D:\Users\frank\AppData\Local\Arduino
D:\Users\frank\Documents\Arduino\libraries\
After a fresh install i couldn't compile, because of that following statement, that indicates he couldn't initialize <Hid.H>
:
#if !defined(_USING_HID)
#warning "Using legacy HID core (non pluggable)"
#else
After that failure I installed the Arduino Plugin to Visual Studio Code, that compiled the Code without any Issue.
And now Arduino IDE will compile the code also without any Problems. (╯°□°)╯︵ ┻━┻