Honza
Honza

Reputation: 1008

OpenPose: E0312 / no suitable user-defined conversion from "fLS::clstring" to "const op::String" and other errors

my NB crashed a few weeks ago and what was working well on my Linux Ubuntu, now does not. I need to install and make OpenPose working on my second notebook (the one from my job). Unfortunately, here I have only Windows 10 and it is not possible to install other OS. I was not able to make working correctly CMake, so I've taken my last chance and I am trying to run it in Visual Studio. I have added all libraries, executables and includes to my project and I tried to run my project. And now, some of GFLAGS are not working. Now, there are a few errors of following two types:

E0312 / no suitable user-defined conversion from "fLS::clstring" to "const op::String"

C++ no operator matches these operands
    operand types are: std::tuple<op::ProducerType &, std::string &> = std::pair<op::ProducerType, op::String>

Could you please help me with this error? I know what is wrong, but how can I fix it? I assume that it could be by another version of OpenPose between old and new notebook. But, how to fix it?

Thank you very much. Bye

Upvotes: 0

Views: 438

Answers (1)

ravi
ravi

Reputation: 6328

I assume you are using the latest OpenPose. From OpenPose 1.6.0 several changes are done in the code such as op::String as a container of std::string.

Given very limited information in the question, I propose the following workarounds-

  1. You may checkout OpenPose 1.5.1 by executing git checkout tags/v1.5.1
  2. If you want to stick to the latest version, use op::String function. An example showing the comparison is given below-
    // Older versions, i.e., OpenPose version < 1.6
    const auto outputSize = op::flagsToPoint(FLAGS_output_resolution, "-1x-1");
    // Newer versions, i.e., OpenPose version >= 1.6
    const auto outputSize = op::flagsToPoint(op::String(FLAGS_output_resolution), "-1x-1");
    

Lastly, I would appreciate it if you could provide additional details such as OpenPose Version, MWE, etc.

Upvotes: 1

Related Questions