Skip to content
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

where is the main start point #2

Open
Guangyi-Z opened this issue Apr 16, 2015 · 1 comment
Open

where is the main start point #2

Guangyi-Z opened this issue Apr 16, 2015 · 1 comment

Comments

@Guangyi-Z
Copy link

I don't know whether it's the right place to ask this question:

where is the DECLARE_ACTOR_MAIN and ACTOR_FUNCTION? I have read through the source code but not found any clues about them, i.e., where is the common main() start point of C program in the example?

@amamory
Copy link

amamory commented Sep 20, 2015

Hi,

I was looking for a lightweight actor oriented C lib (to be used in embedded systems with small memory and OS) and this one seems to be quite promising.
However, I was not able to compile the examples it because the same error reported by JanFan.

I followed the instructions and that's the error messages I found:

lsa@lsa:/Downloads/repos/libactor$ gcc -lactor -o example examples/example.c
examples/example.c: In function ‘trap_exit’:
examples/example.c:60:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘actor_id’ [-Wformat]
examples/example.c: In function ‘echo_client’:
examples/example.c:74:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
examples/example.c: In function ‘echo_server’:
examples/example.c:115:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
examples/example.c: In function ‘main_func’:
examples/example.c:160:42: error: dereferencing pointer to incomplete type
examples/example.c:161:21: error: dereferencing pointer to incomplete type
examples/example.c:161:63: error: dereferencing pointer to incomplete type
examples/example.c: In function ‘DECLARE_ACTOR_MAIN’:
examples/example.c:173:1: error: expected ‘{’ at end of input
lsa@lsa:
/Downloads/repos/libactor$ gcc -lactor -o http_server examples/http_server.c
examples/http_server.c:99:1: error: redefinition of ‘ACTOR_FUNCTION’
examples/http_server.c:69:1: note: previous definition of ‘ACTOR_FUNCTION’ was here
examples/http_server.c: In function ‘ACTOR_FUNCTION’:
examples/http_server.c:135:32: error: ‘http_client’ undeclared (first use in this function)
examples/http_server.c:135:32: note: each undeclared identifier is reported only once for each function it appears in
examples/http_server.c:135:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
examples/http_server.c: At top level:
examples/http_server.c:147:1: error: redefinition of ‘ACTOR_FUNCTION’
examples/http_server.c:69:1: note: previous definition of ‘ACTOR_FUNCTION’ was here
examples/http_server.c: In function ‘ACTOR_FUNCTION’:
examples/http_server.c:148:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
examples/http_server.c:150:10: error: dereferencing pointer to incomplete type
examples/http_server.c:150:54: error: dereferencing pointer to incomplete type
examples/http_server.c:151:34: error: ‘http_listener’ undeclared (first use in this function)
examples/http_server.c:151:68: error: dereferencing pointer to incomplete type
examples/http_server.c: In function ‘DECLARE_ACTOR_MAIN’:
examples/http_server.c:156:1: error: expected ‘{’ at end of input

There are quite a few undefined types/macros such as: ACTOR_FUNCTION, actor_main.

I executed a recursive 'grep' into the entire source code and those definitions are definitely not there.
Perhaps there is a missing file ....

best regards,
Alexandre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants