[Tinyos-help] Tossim problem.

Philip Levis pal at cs.stanford.edu
Thu Sep 29 17:29:36 PDT 2005


On Sep 28, 2005, at 2:31 PM, Mohammad Rahimi wrote:

>
> colleagues,
>
> we are trying to cimpile some codes for pc platform that involves
> communicating with the database. But the compilation caomplains  
> about the
> mysql header regarding use of () and not (void).
>
> *************************************************
> /usr/include/mysql/mysql.h:68: use (), not (void), for 0-argument  
> functios
> In file included from /usr/include/mysql/mysql.h:79,from
> ../../../contrib/tos/platform/pc/cpldM.nc:70:
> /usr/include/mysql/mysql_com.h:168: storage class specified for  
> parameter `type name'
> /usr/include/mysql/mysql_com.h:227: use (), not (void), for 0- 
> argument functios
> /usr/include/mysql/mysql_com.h:230: use (), not (void), for 0- 
> argument functios
> /usr/include/mysql/mysql_com.h:231: use (), not (void), for 0- 
> argument functios
> In file included from
> ../../../contrib/tos/platform/pc/cpldM.nc:70:
> /usr/include/mysql/mysql.h:259: use (), not (void), for 0-argument  
> functios
> /usr/include/mysql/mysql.h:297: use (), not (void), for 0-argument  
> functios
> *************************************************
>
> we did something quick and ugly. we copied the mysql header and  
> changed it
> to remove the error. But we get this error now:
>
> *************************************************
> /home/dzats/tinyos-1.x/tos/platform/pc/PCRadio.h:144: error:  
> incompatible types in assignment
> /home/dzats/tinyos-1.x/tos/platform/pc/PCRadio.h:145: error:  
> incompatible types in assignment
> /home/dzats/tinyos-1.x/tos/platform/pc/PCRadio.h:146: error:  
> incompatible types in assignment
> /home/dzats/tinyos-1.x/tos/platform/pc/PCRadio.h:147: error:  
> incompatible types in assignment
> *************************************************
>
> I wander if we do womthing wrong fundumentally. What version of gcc  
> and
> glibc we should use? Or is there any other reason for these errors?

nesC actually has *slightly* different function syntax than C. I  
think you might be the first person to notice! :)

Specifically, in C, x() actually declares a function with an unknown  
argument list that can be defined later, while x(void) declares a  
function with no arguments.

In nesC, x(void) is illegal and x() declares a function with no  
arguments.

The best solution is to wrap your code in a library that has a nesC- 
friendly interface, then link TOSSIM against your library.

Phil




More information about the Tinyos-help mailing list