0

I use libwebsockets for a client program in C. Therefore I build the library for the libwebsocktes locally on my machine (ubuntu). After I want to Build the Project in Eclipse, I get the following output:

14:58:40 **** Incremental Build of configuration Build (GNU) for project ClientA ****
make all 
cc -o clientA ifaddrs.o mo.o misc.o dm.o ws.o  -lcurl -lrt -lxml2 -ljson-c   -lssl -lcrypto   -lpthread -Wl,-Bstatic -L/home/vps/src/libwebsockets/build/lib -lwebsockets -Wl,-Bdynamic
/usr/bin/ld: /home/bla/libwebsockets/build/lib/libwebsockets.a(ssl.c.o):  undefined reference to symbol 'SSL_get_fd@@OPENSSL_1.0.0'
/usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/libssl.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [clientA] Error 1
14:58:41 Build Finished (took 1s.223ms)

It seems to be a problem with the libwebsockets.a. But how I can solve it ?

BerndG88
  • 1
  • 1
  • Possible duplicate of [Strange linking error: DSO missing from command line](http://stackoverflow.com/questions/19901934/strange-linking-error-dso-missing-from-command-line) – user3528438 Feb 11 '16 at 14:50
  • 1
    move -lwebsockets before -lssl – user3528438 Feb 11 '16 at 14:50
  • when resolving symbols, the order of the libraries counts. (one can group libraries so they are searched repeatedly in a loop, until no more symbols are resolved. But, in this instance, just the proper order of the libraries should be sufficient to fix the problem – user3629249 Feb 12 '16 at 20:17

0 Answers0