Using STL (C++) in Platform Builder subprojects
Michel - October 11, 2016 - 05:05
Sometimes it is nice or necessary to be able to use STL or other C++ features in Platform Builder subprojects. This blog post explains what you need to do to make this work:
In your subprojects sources file, add the following path to _ISVINCPATH:
$(_WINCEROOT)\public\common\sdk\crt\include\stl;
And add the following lines to TARGETLIBS:
$(SG_OUTPUT_ROOT)\sdk\crt\lib\ARM\libcpmt.lib \
$(SG_OUTPUT_ROOT)\sdk\crt\lib\ARM\msvcrt.lib \
$(SG_OUTPUT_ROOT)\sdk\crt\lib\ARM\msvcrt.lib \
You can use libcpmtd.lib and msvcrtd.lib for debug builds.
And finally add:
CDEFINES=/EHsc
The required libraries are documented here.
After the above changes, the subprojects build the same as standalone SDK projects.
Thanks to Rajiv for figuring this out!