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

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,000 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 117.6K 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.