VS 2022 passing std::vector from c++/cli to c++ does not work in debug mode

nenad.poljcic nenad.poljcic 0 Reputation points
2024-09-04T08:09:34.5133333+00:00

Hi,

I am trying to pass std::vector from c++/cli to c++. It works in Release mode but in debug mode passed parameter std::vector is always size=0. I am questing is has something to do with c++ settings.

Appreciate any advice

Nenad

Developer technologies Visual Studio Debugging
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 122.5K Reputation points
    2024-09-04T10:48:23.25+00:00

    How did you check the value of nrPoints?

    Make sure that the C/C++, Code Generation, Runtime Library is “/MDd” for both projects. Did you change other project options?

    0 comments No comments

  2. nenad.poljcic nenad.poljcic 0 Reputation points
    2024-09-04T11:08:26.0333333+00:00

    "Viorel"

    "Make sure that the C/C++, Code Generation, Runtime Library is “/MDd” for both projects. Did you change other project options?"

    THANK YOU. " “/MDd” " solved the problem!!!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.