Skip to main content
1-Visitor
April 20, 2021
Solved

unable to use C++ libraries like Map, Vector

  • April 20, 2021
  • 2 replies
  • 2070 views
I am using Creo Parametric - Release 4.0 (connected) 4.0 M130

Hi Team,

I am using Visual Studio 2015 to create a function to loop through Creo parts and store them in a vector/map.
When I try to include #include & #include into the solution, it throws up many errors.

I did check the similar issue raised on PTC(https://community.ptc.com/t5/Customization/toolkit-c-include-failed/m-p/578733#M7858), but even after following those steps the errors still remained.
    Best answer by FV_01

    just thought of another reason for STL failures - make sure there is no '_DEBUG' preprocessor defined in any VS configs.

    HIH.

    2 replies

    April 20, 2021

    use PTC provided VS solution from pt_install_cxx.zip which could be found in protoolkit\x86e_win64\obj directory.

    Compile, link, run.

    if pt_install_cxx app is not working you would have to adjust your system environment CREO_INSTALL settings and probably to modify solution's 'include directories' settings and 'source directories' settings. Make sure that the platform toolset specified in Pro/TK user guide is in use. This is about the extent one would need to tweak out of the box pt_install_cxx VS project.

    Add your std::map and std::vector statements to TestInstall.cxx file. Compile, link, run. Should work fine.

    FV_0-1618938624303.png

     

     

     

    FV_0117-PeridotAnswer
    April 26, 2021

    just thought of another reason for STL failures - make sure there is no '_DEBUG' preprocessor defined in any VS configs.

    HIH.

    14-Alexandrite
    April 21, 2021

    How do you use vector, map (code), and what mistake is this?

    For example: I guess that before Update 2 was not fully supported Initializer list constructors. What is the VS2015 version?

    (Definitely use the current VS 2015 Update 3.)

    PZ