Giter Club home page Giter Club logo

libev-examples's Introduction

libev-examples's People

Contributors

kpy3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libev-examples's Issues

compile error on 64-bit linux

stephan@ludo:~/cvs/libev-examples$ make
...
cc -Wall -Werror -lev -ggdb3 -I./include -o bin/unix-echo-client src/unix-echo-client.c
cc1: warnings being treated as errors
src/unix-echo-client.c: In function 'stdin_cb':
src/unix-echo-client.c:70: error: passing argument 2 of 'getline' from incompatible pointer type
/usr/include/stdio.h:671: note: expected 'size_t * __restrict__' but argument is of type 'uint *'
make: *** [bin/unix-echo-client] Error 1

Changing unix-echo-client.c:

uint len = 0;
to:
size_t len = 0;

corrects the problem.

(BTW: thanks for turning on -Wall and -Werror: more projects should do that by default!)

PS: gcc 4.4.5 on Ubuntu 10.10 on x86/64.

TCP socket based echo client

Thanks for creating the examples. There is a unix-echo-client.c, wonder if there is a tcp socket based echo client?

Thanks

dead link

The website linked in the readme is not reachable: "We can’t connect to the server at git.daplie.com"

does not 'make' under U14.04

Just cloned on ubuntu 14.04 with the default libev.

This is the #1 google result for "libev examples" - it would be nice if it worked with the most common developer distribution.

brian@ubuntu1404-vm:/dev/libev-examples$ make
cc -Wall -Werror -lev -ggdb3 -I./include -o obj/array-heap.o -c src/array-heap.c
cc -Wall -Werror -lev -ggdb3 -I./include -o bin/unix-echo-server src/unix-echo-server.c obj/array-heap.o
/tmp/ccDrpTcP.o: In function ev_loop': /usr/include/ev.h:826: undefined reference toev_run'
/tmp/ccDrpTcP.o: In function client_cb': /home/brian/dev/libev-examples/src/unix-echo-server.c:53: undefined reference toev_io_stop'
/tmp/ccDrpTcP.o: In function server_cb': /home/brian/dev/libev-examples/src/unix-echo-server.c:110: undefined reference toev_io_start'
/tmp/ccDrpTcP.o: In function main': /home/brian/dev/libev-examples/src/unix-echo-server.c:173: undefined reference toev_default_loop'
/home/brian/dev/libev-examples/src/unix-echo-server.c:180: undefined reference to ev_periodic_start' /home/brian/dev/libev-examples/src/unix-echo-server.c:184: undefined reference toev_io_start'
collect2: error: ld returned 1 exit status
make: *** [bin/unix-echo-server] Error 1
brian@ubuntu1404-vm:
/dev/libev-examples$

The order of LDFLAGS for gcc

Some version of gcc will ignore the linked Libraries if the -l options before the object files:

$ cc -Wall -Werror -lev -ggdb3 -I./include -o bin/unix-echo-server src/unix-echo-server.c obj/array-heap.o
ccVwfl0g.o: In function `ev_loop':
/usr/include/ev.h:826: undefined reference to `ev_run'

It is OK after moving the -lev to the end of the command:

$ cc -Wall -Werror -ggdb3 -I./include -o bin/unix-echo-server src/unix-echo-server.c obj/array-heap.o -lev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.