[Libwebsockets] Compilation issue

rahul bhola me at rahulbhola.in
Sat Feb 13 10:56:00 CET 2016


The problem is that it is not building even for me. It is unable to find
the functions even though i included the .so file

On Sat, Feb 13, 2016 at 9:51 AM Andy Green <andy at warmcat.com> wrote:

>
>
> On February 13, 2016 4:58:10 PM GMT+08:00, rahul bhola <me at rahulbhola.in>
> wrote:
> >Hi,
> > What is the correct way to include the lib. The current way i am doing
> >is using
> >
> >g++ -o obj/ws.o -fpic -c src/ws.cc -lwebsockets -I/usr/local/include
> >-L/usr/local/lib/libwebsockets.so -std=c++11 -g
>
> You can do that but it's a bit fragile if someone builds your thing later
> and has installed lws somewhere else.
>
> It's only the default it goes into /usr/local.  You can control the
> installation dir, see README.build.md
>
> ```
> NOTE2: A common option you may want to give is to set the install path,
> same as --prefix= with autotools. It defaults to /usr/local. You can do
> this by, eg
>
> $ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
>
> NOTE3: On machines that want libraries in lib64, you can also add the
> following to the cmake line
>
> -DLIB_SUFFIX=64
> ```
>
> Then libwebsockets.h is in /usr/include which is already on your compiler
> -I list.
>
> -Andy
>
> >I compiler it from source and checked the so , it is showing up in lib.
> >
> >Cheers
> >Rahul
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Libwebsockets mailing list
> >Libwebsockets at ml.libwebsockets.org
> >http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20160213/e0a19ce9/attachment-0001.html>


More information about the Libwebsockets mailing list