Frage

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.

War es hilfreich?

Lösung

You are missing -lrt, most likely.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top