Forums » Software Development »
STL hash maps and hash sets. CCS5 & CCS 6.
Added by Edwin McKay over 8 years ago
Our existing code that we are porting to the DSP platform uses the STL hash_set template. The code compiles on the original platform, it also compiles under CCS6. However, under CCS 5 it does not. I get 100's of errors in the /opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/hash_map file itself. 'Expecting }', 'identifier _Tr' is undefined, etc.. Is there some sort of #define that I'm supposed to use?
I noticed there appears to be significant differences between the CCS5 and CCS6 hash stl files.
According to some web sites, I should be able to do something as simple as:
#include <hash_map>
using namespace std;
int main()
{
hash_map <int, int> hm1;
return 0;
}
But perhaps not because the templates all expect real classes, not "types". Our code does use classes, I was just trying a simple example to see what was wrong.
Is there any sample STL hash_set code out there?
Is there any documentation on the STL that are provided with CCS5?
Replies (3)
RE: STL hash maps and hash sets. CCS5 & CCS 6. - Added by Jonathan Cormier over 8 years ago
Confirmed that in CCS5.5 using compiler version (TI v7.4.4) I get a bunch of errors after adding #include <map>
Project was a DSPBios hello world template.
**** Build of configuration Debug for project testL138-DSP **** /opt/ti/ccsv5/utils/bin/gmake -k all Building file: ../hello.c Invoking: C6000 Compiler "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 --abi=coffabi -g --include_path="/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include" --include_path="/home/jcormier/workspace_v5_5/testL138-DSP/Debug" --include_path="/opt/ti/bios_5_42_01_09/packages/ti/bios/include" --include_path="/opt/ti/bios_5_42_01_09/packages/ti/rtdx/include/c6000" --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="hello.pp" "../hello.c" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 8: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 8: error #66: expected a ";" >> Compilation failure "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 14: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 17: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 17: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 25: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 28: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 28: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 36: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 39: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 39: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 47: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 50: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 50: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 58: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 61: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 61: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 69: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 72: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 72: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 80: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 83: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 83: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 91: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 94: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 94: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 102: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 105: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 105: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 113: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 116: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 116: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 124: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 127: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 127: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 135: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 138: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 138: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 146: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 149: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 149: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 157: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 160: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 160: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 168: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 171: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 171: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 179: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 182: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 182: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 190: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 193: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 193: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 210: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 213: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 213: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 239: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 242: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 242: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 277: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 278: error #20: identifier "typename" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 278: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 279: error #171: expected a declaration "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 282: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 282: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 319: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 320: error #20: identifier "typename" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 320: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 321: error #171: expected a declaration "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 324: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 324: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 351: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 354: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 354: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 374: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 377: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 377: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 413: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 416: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 416: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 435: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 438: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 438: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 456: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 459: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 459: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 478: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 481: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 481: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 541: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 544: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 544: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 563: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 566: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 566: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 584: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 587: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 587: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 606: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 609: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 609: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 674: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 677: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 677: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 709: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 712: error #78-D: this declaration has no storage class or type specifier "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/functional", line 712: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/stdlib.h", line 62: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/stdlib.h", line 152: error #20: identifier "div_t" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 10: error #20: identifier "class" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 11: warning #262-D: explicit type is missing ("int" assumed) "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 11: error #18: expected a ")" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 13: warning #262-D: explicit type is missing ("int" assumed) "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 13: error #18: expected a ")" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 17: error #20: identifier "class" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 18: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 39: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 40: error #171: expected a declaration "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 41: error #171: expected a declaration "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 77: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 78: error #171: expected a declaration "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 81: error #20: identifier "class" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 82: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 105: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/exception", line 173: error #20: identifier "bool" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 10: error #20: identifier "class" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 11: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 46: warning #12-D: parsing restarts here after previous syntax error "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 57: error #171: expected a declaration "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 59: error #20: identifier "nothrow_t" is undefined "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 70: error #71: incomplete type is not allowed "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 70: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 72: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 75: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 80: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 88: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 90: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 93: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 97: error #66: expected a ";" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include/new", line 105: error #66: expected a ";" Error limit reached. 100 errors detected in the compilation of "../hello.c". Compilation terminated. gmake: *** [hello.obj] Error 1 gmake: Target `all' not remade because of errors.
CCS6 (TI v7.4.7)
Had same errors with an empty Hello World example project.
RE: STL hash maps and hash sets. CCS5 & CCS 6. - Added by Michael Williamson over 8 years ago
You should be able to install the newer compiler with CCS 5 (it's just a front end)?
RE: STL hash maps and hash sets. CCS5 & CCS 6. - Added by Jonathan Cormier over 8 years ago
You might want to post the compile problem to TI's e2e forum. They might be able to help.
Here is a post that looks similar. Also includes link by TI for how to post debug info.
https://e2e.ti.com/support/development_tools/compiler/f/343/t/352202