Closed kamyarghajar closed 7 years ago
These are new string literals in C++11. Compiling ZRTP with GNU-CC and clang++ and the CMakeLists.txt sets the option '-std=c++11' for the compiler. AFAIK also the recent MS C++ compilers support C++11.
Thus, just check if your compiler support C++11.
Cmake 3.7.2 with other tools are installed with Xcode 8.2 command line tools on my system...every tool on my system is almost the latest version:
clang++ --version Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin16.4.0 Thread model: posix
Can I even build the Project with xcode 8.2 command line tools included clang++, cmake. make etc. ? or there is another problem with the build process I am doing?
I'm not an Apple specialist :-) - need to ask a a friend to test this. At least I have no reports that the build fails on Apple devices. I know for sure that a few projects use ZRTPCPP for iOS, also Android with clang++ toolset, Microsoft VisualC, Linux with GCC and clang++.
I don't see any problems with cmake/make. Some friends use this combination to build software in general. I'll ask them to test with ZRTPCPP.
I just called a friend and he gave some feedback. You need to enable C++11 during the compile. Thus just change the CMakeLists.txt as follows:
Move the line 193 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++11")' after the next closing endif(), this this line goes out of the 'if(CMAKE_COMPILER_IS_GNUCXX)' and is set for clang++ compilers as well.
Thank you for the answer and sorry for the inconvenience... the tip made the error in percent 32 that I mentioned go away...but there is another error after that in make:
In file included from
/ZRTPCPP/clients/ccrtp/ZrtpQueue.cpp:25:
/ZRTPCPP/clients/ccrtp/ZrtpQueue.h:21:10: fatal error:
'ccrtp/cqueue.h' file not found
#include <ccrtp/cqueue.h>
^
1 error generated.
make[2]: *** [clients/ccrtp/CMakeFiles/zrtpcpp.dir/ZrtpQueue.cpp.o] Error 1
make[1]: *** [clients/ccrtp/CMakeFiles/zrtpcpp.dir/all] Error 2
make: *** [all] Error 2```
That's easy: if you do not define any option then the CMakeLists.txt assumes that it should build ZRTP for the GNU ccRTP stack. As you may know ZRTP needs a RTP stack to work and you find a detailed description how ZRTP and GNU ccRTP work together in this file: clients/ccrtp/ZrtpQueue.h
Because I don't know your project and which RTP stack you will use I cannot give an answer. However, you may build the library as a standalone lib using this command:
cmake -DCORE_LIB=true ..
However, this does not include an RTP stack or alike. Other project, like ZRTP4PJ, use ZRTPCPP together with RTP stacks, in the mentioned case the pjsip stack and infrastructure.
Actually I want to use ZRTP in a node.js project for encryption and MiTM check and I already have SRTP up & running on my tcp socket but I need to detect MiTM attacks as well using ZRTP along-side with the SRTP cryptography in js code...I couldn't find the js open-source implementation of the ZRTP on the web (as mentioned in here), then I decided to use this cpp implementation and port it to my node.js project...btw thanks your tip worked but do you have any tips next about how to use the built ZRTPCPP afterwards?
I know Alan Johnston's project, however do not know the latest status and if it was implemented at all. Long time ago Alan and I exchanged some e-mails regarding a possible way to implement ZRTP in JavaScript, however, no idea if Alan really started the project.
Yes, I think the project has been stopped or maybe got involved in other business plans that stopped it from being free or even open-source to be accessible for everyone. I hope we can continue this conversation to setup a js implementation of ZRTP, in mail or even on linkedin later to get help from you if I may... I surely do need help with that :D Thanks again
hi, I get this error on making project after cmake in the build folder that I made in ZRTPCPP folder:
ZRTPCPP/zrtp/EmojiBase32.cpp:32:9: error: use of undeclared identifier 'U' U"\U0001f601" // 0002 GRINNING FACE WITH SMILING EYES ^ ZRTPCPP/zrtp/EmojiBase32.cpp:32:10: error: expected ';' after top level declarator U"\U0001f601" // 0002 GRINNING FACE WITH SMILING EYES ^ ; 2 errors generated. make[2]: *** [clients/ccrtp/CMakeFiles/zrtpcpp.dir/__/__/zrtp/EmojiBase32.cpp.o] Error 1 make[1]: *** [clients/ccrtp/CMakeFiles/zrtpcpp.dir/all] Error 2 make: *** [all] Error 2