Hi, Everyone: Now I am reading the document of Building Infrastructures for DROPS Tutorial. And in the server side the code is like this:
#include <stdio.h> #include <l4/names/libnames.h> #include "hiworld-server.h"
char LOG_tag[9]="hiserver"; static int count;
void hi_print_component(CORBA_Object _dice_corba_obj, CORBA_Environment *_dice_corba_env){ printf("Hi world\n"); count++; }
int hi_count_component(CORBA_Object _dice_corba_obj, CORBA_Environment *_dice_corba_env){ return count; }
int main(void){ if(names_register("hiworld")==0){ printf("Error registering at nameserver\n"); return 1; } hi_server_loop(0); }
In the main routine there is function named hi_server_loop. But I don't where is the function definition. i checked the hiworld-server.h and there is no definition.
ths chenggh
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
chenggh wrote on 23.08.2006 10:11 this:
In the main routine there is function named hi_server_loop. But I don't where is the function definition. i checked the hiworld-server.h and there is no definition.
In the C programming language the header files usually contain a declaration of a function and the implementation files contain the definition of that function (with some exceptions). So, it is correct that there is no definition of the function hi_server_loop in the header file hiworld-server.h. Therefore, it could be in the implementation file hiworld-server.c. Have you looked there too?
HTH, Ron. - -- Mit freundlichen Gruessen / with regards ra3 @ inf.tu-dresden.de http://os.inf.tu-dresden.de/~ra3/
l4-hackers@os.inf.tu-dresden.de