use gcc and link with a library

Hello,

J have a problem when I use gcc:
This comand works:
gcc -shared -fpic -I/usr/include/sys -I/usr/include -L/usr/lib/librt.sl essai1.c mylib.sl

but

gcc I/usr/include/sys -I/usr/include -L/usr/lib/librt.sl essai2.c -o essai
don't work.

The first command creates a dynamique library and link the library librt.sl
The second commad creates an executable file using the library librt.sl.
In this library are defined the functions mq_open mq_send etc.. that I use in essai.c, but when I launc this command I have the following message:
/usr/ccs/bin/ld : Unsatisfied symbols
mq_send(code)
mq_open(code)
mq_close(code)l
collect2: ld returned 1 exit status.

Some can help me Thank a lot !
Fr�deric

Thanks you it works !
Frederic.:slight_smile: