Pregunta

I am trying to use POSIX API 'lio_listio' in my program to issue multiple asynchronous I/O system calls with the overhead of 1 kernel context switch.

I have included the library aio.h and also compiled my code with -laio flag. Also I have libaio_devel package installed.

Still when I compile my program it gives the following compilation error:

/home/me/bon/bon.cpp:2509: undefined reference to `lio_listio'

Can someone please suggest what is my I missing.

¿Fue útil?

Solución

You are missing -lrt, most likely.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top