[Libwebsockets] [libwebsockets] #65: Compilation in C++ mode with clang compiler fails

Trac trac at libwebsockets.org
Mon Apr 14 10:43:58 CEST 2014


#65: Compilation in C++ mode with clang compiler fails
------------------------------------+-----------------
 Reporter:  amn                     |      Owner:
     Type:  defect                  |     Status:  new
 Priority:  major                   |  Milestone:
Component:  libwebsocket test apps  |    Version:
 Keywords:                          |
------------------------------------+-----------------
 Compilation of the following code:

 #include<libwebsockets.h>

 int main()
 {
 }

 fails with the clang compiler (shipped by apple with max os x). Compiler
 version:

 $ g++ --version
 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
 --with-gxx-include-dir=/usr/include/c++/4.2.1
 Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
 Target: x86_64-apple-darwin13.1.0
 Thread model: posix

 The error message:

 In file included from /usr/local/include/libwebsockets.h:27:
 In file included from
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cstddef:36:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:486:1:
 error:
       templates must have C++ linkage
 template <bool> struct __static_assert_test;

--
Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/65>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list