The first error is likely caused by the "Mobile-C Ch Package" not being installed.
See Section 2.6 on page 5 on the user guide for complete instructions.
Basically, from the mobilec root directory, you should execute the following commands:
ch ./pkgcreate.ch
sudo pkginstall.ch mobilec
You should be in a Ch shell for the second command to work with best results.
The second error you listed regarding the creation of sockets will need to be looked into in more detail. I will let you know if I resolve that issue.
Regards
- David
On Fri, Jun 26, 2009 at 6:30 AM, li peng <spl.chn@...> wrote:
Hello,
When I run the program in the demo/fipa_test directory, it had some problems.The error messages are as follows:
MobileC > ERROR: cannot find file 'fipa_acl.h'
ERROR: syntax error before or at line 10 in file agentchscriptW95uyQ
==>: #include <fipa_acl.h>
BUG: #include <fipa_acl.h><== ???
ERROR: variable 'fipa_acl_message_t*' not defined
ERROR: command 'fipa_acl_message_t*' not found
ERROR: syntax error before or at line 13 in file agentchscriptW95uyQ
==>: fipa_acl_message_t* tmp;
BUG: fipa_acl_message_t* tmp;<== ???
ERROR: variable 'tmp' not defined
ERROR: command 'tmp' not found
ERROR: syntax error before or at line 20 in file agentchscriptW95uyQ
==>: tmp = mc_AclWaitRetrieve(mc_current_agent);
BUG: tmp = mc_AclWaitRetrieve(mc_current_agent);<== ???
ERROR: argument 2 of the function is undefined or not a valid expression
ERROR: syntax error before or at line 22 in file agentchscriptW95uyQ
==>: printf("Message is from %s\n", tmp->sender->name);
BUG: printf("Message is from %s\n", tmp<== ???
ERROR: argument 2 of the function is undefined or not a valid expression
ERROR: syntax error before or at line 23 in file agentchscriptW95uyQ
==>: printf("The content is %s\n", tmp->content->content);
BUG: printf("The content is %s\n", tmp<== ???
ERROR: variable 'reply' not defined
ERROR: command 'reply' not found
ERROR: syntax error before or at line 25 in file agentchscriptW95uyQ
==>: reply = mc_AclReply(tmp);
BUG: reply = mc_AclReply(tmp);<== ???
ERROR: argument 1 of the function is undefined or not a valid expression
ERROR: number of argument is 0, need 3 arguments
ERROR: syntax error before or at line 30 in file agentchscriptW95uyQ
==>: reply,
BUG: reply<== ???
ERROR: argument 1 of the function is undefined or not a valid expression
ERROR: number of argument is 0, need 2 arguments
ERROR: syntax error before or at line 34 in file agentchscriptW95uyQ
==>: reply,
BUG: reply<== ???
ERROR: argument 1 of the function is undefined or not a valid expression
ERROR: number of argument is 0, need 1 argument
ERROR: syntax error before or at line 37 in file agentchscriptW95uyQ
==>: mc_AclSend(reply);
BUG: mc_AclSend(reply<== ???
ERROR: argument 1 of the function is undefined or not a valid expression
ERROR: number of argument is 0, need 1 argument
ERROR: syntax error before or at line 38 in file agentchscriptW95uyQ
==>: mc_AclDestroy(tmp);
BUG: mc_AclDestroy(tmp<== ???
ERROR: in program ending for file 'agentchscriptW95uyQ', may be missing }
ERROR: cannot execute command 'agentchscriptW95uyQ'
In the .xml files of this directory, they include sentences "#pragma package "/usr/local/ch/package/mobilec" ",
but I can't find mobilec in package directory.
---------------------------------------------------------------------------------------------
The second problem is that when I run a simple socket program(which can run correctly itself in a .c file) by using a mobile agent(in a .xml file) ,and then errors occured as follows:
MobileC > ERROR: argument 1 of the function is undefined or not a valid expression
ERROR: number of argument is 0, need 2 arguments
ERROR: syntax error before or at line 6 in file /usr/local/ch/toolkit/embedch/lib/libopt/inet_pton.chf
==>: fptr = dlsym(_ChArpaInet_handle, "inet_pton_chdl");
BUG: fptr = dlsym(_ChArpaInet_handle<== ???
ERROR: cannot execute command 'agentchscriptH06The'
I am not familiar about both Mobile-C and Ch ,so it is really difficult for me to sovle these problems in a short time. I have read the user_guide many times, but I cannot find the anwsers.If there any other documents with which I can help myself? Thank you .
LI Peng