cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

unable to use C++ libraries like Map, Vector

YB_9813722
2-Guest

unable to use C++ libraries like Map, Vector

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.
1 ACCEPTED SOLUTION

Accepted Solutions
FV
17-Peridot
17-Peridot
(To:FV)

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

HIH.

View solution in original post

3 REPLIES 3
FV
17-Peridot
17-Peridot
(To:YB_9813722)

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
17-Peridot
17-Peridot
(To:FV)

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

HIH.

zemanekp
13-Aquamarine
(To:YB_9813722)

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

Top Tags