Reputation: 2141
I installed libsrtp on my ubuntu machine according to the directives in read me, the tests worked fine, and the rptw utility included in libsrtp worked perfectly too. But when I tried to include srtp.h in my HelloWorld! program, it gives me an error that:
fatal error: srtp.h: No such file or directory
compilation terminated.
Concretely, my main file is this
#include "srtp.h"
int main()
{
return 0;
}
My libsrtp.a is present in /usr/local/lib/lib
I used this gcc statement from this blog:
gcc -static main.c -L/usr/local/lib/lib/ -llibsrtp -o main
I will be deeply grateful for any help.
Upvotes: 0
Views: 1575
Reputation: 229274
You've found your libsrtp.a , but where is srtp.h ? You'll need to tell the compiler where to search for included files if it's not in a standard location with the -I
flag.
Perhaps you need a -I/usr/local/include
or -I/usr/local/include/srtp
Note also that -llibsrtp
is likely wrong, you need to give the name without the lib prefix. So that makes it -lsrtp
Upvotes: 2