-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inv_mpu_lib/inv_mpu.c:392:2: error: expected primary-expression before ‘.’ token #2
Comments
Your compiler does not support struct initialisations. You can change you compiler or initialise the "struct gyro_reg_s reg" in the following way: https://github.com/rpicopter/ArduinoMotionSensorExample/blob/master/inv_mpu.cpp#L409 |
gregd72002 wrote:
Strange, i use debian wheezy ad it's gcc, there is some flag to enable C99 ? Miky |
Ok i change CXX=g++ to CXX=gcc and now error disappear As stated here: now it compile but not link: |
Well, the Makefile was written to support g++ only. Since you changed the compiler to gcc, further changes are needed to the Makefile. Since you now how objects compiled, you can try changing the compiler back to g++ and issue 'make'. It should now invoke only the linker as all the objects are already compiled. However, the permanent solution should be to convert the self initialised struct in inv_mpu.c into a new function that initialises them as indicated earlier. Hope this helps. |
I clone your example in my cubieboard (armhf board), and giving make
i receive this message.
Other projects compile correct.
The text was updated successfully, but these errors were encountered: