Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build errors #110

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

incebellipipo
Copy link

The SDK stopped building with the recent commits. By looking at the recent commits and pull request I understand that there is some refactoring underway. But I thought I'd fix the build errors.

$ mkdir build
$ cd build
$ cmake ..

cmake.log

-- Configuring done
-- Generating done
-- Build files have been written to: build
make -j10
Consolidate compiler generated dependencies of target qualisys_cpp_sdk
[ 28%] Building CXX object CMakeFiles/qualisys_cpp_sdk.dir/MarkupSerializer.cpp.o
[ 28%] Building CXX object CMakeFiles/qualisys_cpp_sdk.dir/Settings.cpp.o
Settings.cpp: In function ‘const char* qualisys_cpp_sdk::SkeletonDofToStringSettings(qualisys_cpp_sdk::EDegreeOfFreedom)’:
Settings.cpp:5:20: error: ‘find_if’ is not a member of ‘std’
    5 |     auto it = std::find_if(DEGREES_OF_FREEDOM.begin(), DEGREES_OF_FREEDOM.end(), [&](const auto& DEGREE_OF_FREEDOM) { return (DEGREE_OF_FREEDOM.first == dof); });
      |                    ^~~~~~~
Settings.cpp: In function ‘qualisys_cpp_sdk::EDegreeOfFreedom qualisys_cpp_sdk::SkeletonStringToDofSettings(const string&)’:
Settings.cpp:17:20: error: ‘find_if’ is not a member of ‘std’
   17 |     auto it = std::find_if(DEGREES_OF_FREEDOM.begin(), DEGREES_OF_FREEDOM.end(), [&](const auto& DEGREE_OF_FREEDOM) { return (DEGREE_OF_FREEDOM.second == str); });
      |                    ^~~~~~~
make[2]: *** [CMakeFiles/qualisys_cpp_sdk.dir/

build.make:132: CMakeFiles/qualisys_cpp_sdk.dir/Settings.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
MarkupSerializer.cpp: In member function ‘virtual bool qualisys_cpp_sdk::CMarkupDeserializer::Deserialize3DSettings(qualisys_cpp_sdk::SSettings3D&, bool&)’:
MarkupSerializer.cpp:1478:5: error: ‘strcpy’ was not declared in this scope
 1478 |     strcpy(p3dSettings.pCalibrationTime, tStr.c_str());
      |     ^~~~~~
MarkupSerializer.cpp:7:1: note: ‘strcpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
    6 | #include <map>
  +++ |+#include <cstring>
    7 |
MarkupSerializer.cpp: In member function ‘virtual std::string qualisys_cpp_sdk::CMarkupSerializer::SetCameraSyncOutSettings(unsigned int, unsigned int, const qualisys_cpp_sdk::ESyncOutFreqMode*, const unsigned int*, const float*, const bool*)’:
MarkupSerializer.cpp:3386:24: error: could not convert ‘false’ from ‘bool’ to ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
 3386 |                 return false; // Should never happen
      |                        ^~~~~
      |                        |
      |                        bool
make[2]: *** [CMakeFiles/qualisys_cpp_sdk.dir/build.make:146: CMakeFiles/qualisys_cpp_sdk.dir/MarkupSerializer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/qualisys_cpp_sdk.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

make.log
cmake.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant