This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

STL library in ccsv5/tools/compiler



Hello,

First I would like to excuse you if I choose wrong forum for this topic but but this seemed to me the most appropriate. 

I want to use the STL library which I have found in ccsv5/tools/compiler path. Unfortunately if I will add the header file and the library during the compilation two errors are appearing:

- #20 identifier "const_iterator" is undefined

- #20 identifier "size_type" is undefined

I just would like to know is this library that came with the trial version of CCSv5 is complete and ready to use?

  • Damian Gowor said:
    #20 identifier "const_iterator" is undefined

    That's usually a namespace problem.  Try adding ...

    using namespace std;

    just to see if that fixes the problem.  But do not use that as a long term fix.   Here's why.

    Damian Gowor said:
    I just would like to know is this library that came with the trial version of CCSv5 is complete and ready to use?

    Yes.

    Thanks and regards,

    -George

  • Thanks George,

    Unfortunately it doesn't helps this time. Still same errors. Maybe I am missing some files or include path?

  • Please build with --verbose_diagnostics.  Then cut-n-paste all of the compiler diagnostics into your next post.

    Thanks and regards,

    -George

  • Here it is:

    **** Build of configuration Debug for project Drivers ****

    C:\ti\ccsv5\utils\bin\gmake -k all
    'Building file: ../UARTDriver.cpp'
    'Invoking: TMS470 Compiler'
    "C:/ti/ccsv5/tools/compiler/tms470/bin/cl470" -mv5e -g --exceptions --include_path="C:/ti/ccsv5/tools/compiler/tms470/include" --verbose_diagnostics --diag_warning=225 --display_error_number -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="UARTDriver.pp" --cmd_file="./configPkg/compiler.opt" "../UARTDriver.cpp"
    'Finished building: ../UARTDriver.cpp'
    ' '
    'Building file: ../main.cpp'
    'Invoking: TMS470 Compiler'
    "C:/ti/ccsv5/tools/compiler/tms470/bin/cl470" -mv5e -g --exceptions --include_path="C:/ti/ccsv5/tools/compiler/tms470/include" --verbose_diagnostics --diag_warning=225 --display_error_number -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt" "../main.cpp"
    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 37: error #20:
    identifier "size_type" is undefined
    explicit Deque(size_type _Count)

    ^
    >> Compilation failure

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 42: error #20:
    identifier "size_type" is undefined
    Deque(size_type _Count, const _Ty& _Val)
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 47: error #20:
    identifier "const_iterator" is undefined
    typedef const_iterator _Iter;
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 69: error #20:
    identifier "size_type" is undefined
    explicit List(size_type _Count)
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 74: error #20:
    identifier "size_type" is undefined
    List(size_type _Count, const _Ty& _Val)
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 79: error #20:
    identifier "const_iterator" is undefined
    typedef const_iterator _Iter;
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 108: error #20:
    identifier "const_iterator" is undefined
    typedef const_iterator _Iter;
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 142: error #20:
    identifier "const_iterator" is undefined
    typedef const_iterator _Iter;
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 175: error #20:
    identifier "const_iterator" is undefined
    typedef const_iterator _Iter;
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 208: error #20:
    identifier "const_iterator" is undefined
    typedef const_iterator _Iter;
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 235: error #20:
    identifier "size_type" is undefined
    explicit Vector(size_type _Count)
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 240: error #20:
    identifier "size_type" is undefined
    Vector(size_type _Count, const _Ty& _Val)
    ^

    "C:/ti/ccsv5/tools/compiler/tms470/include/stl.h", line 245: error #20:
    identifier "const_iterator" is undefined
    typedef const_iterator _Iter;
    ^

    13 errors detected in the compilation of "../main.cpp".
    gmake: *** [main.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****
  • The file "stl.h" appears to be a relic.  You should stop using it immediately.  Instead include the C++ STL header files directly as needed:

    #include <vector>
    #include <deque>

    I don't know why it fails to compile.  I'd have to stare at it for a while to figure that out.

    Probably the file will be removed from the library.