This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error while porting library to ATmel studio

I'm getting Error 7 too few arguments to function 'lib_aci_set_local_data' C:\Users\nishant\Documents\Atmel Studio\6.2\ATmega_AdafruitLIB_nRF8001\ATmega_adafruitLIB_nRF8001\utility\uart\services.c 47 3 ATmega_adafruitLIB_nRF8001 and

Error 11 too few arguments to function 'lib_aci_is_pipe_available' C:\Users\nishant\Documents\Atmel Studio\6.2\ATmega_AdafruitLIB_nRF8001\ATmega_adafruitLIB_nRF8001\utility\uart\services.c 59 3 ATmega_adafruitLIB_nRF8001

while trying to compile the code(arduino SDK for arduino) that I ported to ATmel studio.

I looked in services.c and lib_ac.h and lib_aci.cpp and see that the arguments are less in count, 3 in place of 4! so that's why the error BUT the same library is compiling for in the arduino IDE , why is it so?

Parents
  • The most likely reason for this issue is that the Arduino IDE may not have the flags that do these checks i.e. number of parameters in the function when compiling, while Atmel studio is more strict on that.

    Being a c/c++ compiler doesn't it needs to follow the ANSI rules and differentiate between the same function names with different parameters? isn't that weird more than normal here?

Reply
  • The most likely reason for this issue is that the Arduino IDE may not have the flags that do these checks i.e. number of parameters in the function when compiling, while Atmel studio is more strict on that.

    Being a c/c++ compiler doesn't it needs to follow the ANSI rules and differentiate between the same function names with different parameters? isn't that weird more than normal here?

Children
No Data
Related