Tool/software: TI C/C++ Compiler
I am trying to declare a c++ function that takes a map as argument but not working ....
Please let me know your comments, thx
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <map>
#include <regex>
#include "ark_premitive_data_types.h"
using namespace std;
#define MAXCHAR 10000
typedef struct ark_field_entry {
public:
std::string name;
std::string type;
dt_int32 ncols;
dt_int32 nrows;
} ark_field_entrt;
void print_hmap_el(std::map<string, ark_field_entry> hmap, string key){ // << HERE
cout << "hmap[key]: \n" \
<< "\t name: " << hmap[key].name << endl \
<< "\t type: " << hmap[key].type << endl \
<< "\t nrows: " << hmap[key].nrows << endl \
<< "\t ncols: " << hmap[key].ncols << endl;
}
int main(){
std::map<std::string, ark_field_entry> retmap;
cout << "-= Program Done =-" << endl;
}
The error is as below:
**** Build of configuration Debug for project whiteboard ****
"C:\\ti\\ccs920\\ccs\\utils\\bin\\gmake" -k -j 8 all -O
Building file: "../test_json.cpp"
Invoking: C6000 Compiler
"C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.6/bin/cl6x" -mv6600 --include_path="C:/Users/Mehdi-laptop/workspace_v9_2/whiteboard" --include_path="C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.6/include" -g --c99 --c++14 --diag_warning=225 --diag_wrap=off --display_error_number --openmp --preproc_with_compile --preproc_dependency="test_json.d_raw" --cmd_file="configPkg/compiler.opt" "../test_json.cpp"
>> Compilation failure
subdir_rules.mk:23: recipe for target 'test_json.obj' failed
INTERNAL ERROR: C:\ti\ccs920\ccs\tools\compiler\ti-cgt-c6000_8.3.6\bin\acpia6x.exe experienced a segmentation fault
while processing function (unknown or file scope) file ../test_json.cpp line 79
This is caused by a defect in the TI EABI C/C++ Parser.
TI Customer Support may be able to suggest a workaround to avoid this.
Upgrading to the newest version of the compiler may fix this problem.
Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".
We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.
Include the .pp file created by option --preproc_with_comment
gmake: *** [test_json.obj] Error 1
gmake: Target 'all' not remade because of errors.