[Libwebsockets] [libwebsockets] #80: cpptest fails to link and run

Trac trac at libwebsockets.org
Fri Jul 25 20:46:30 CEST 2014

#80: cpptest fails to link and run
  Reporter:  gkcambr@…               |      Owner:
      Type:  task                    |     Status:  closed
  Priority:  trivial                 |  Milestone:
 Component:  libwebsocket test apps  |    Version:  1.0
Resolution:  fixed                   |   Keywords:  cpptest documentation
Changes (by gkcambr@…):

 * status:  new => closed
 * resolution:   => fixed


 I found the problem. When compiling on Ubuntu (and probably other linux
 systems) you need to explicitly link the zlib library. The following
 compile command worked for me on Ubuntu

 sudo g++ -DINSTALL_DATADIR=\"/usr/share/\" -fpermissive -static -ocpptest
 test.cpp -L../build/lib -lwebsockets -lz

Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/80#comment:1>
libwebsockets <http://libwebsockets.org>
libwebsockets C library

More information about the Libwebsockets mailing list