arm-none-eabi-g++ system include path

Asked by Gerd Mueller on 2018-08-01

I have following header file Foo.h:

    #ifndef _FOO_H_
    #define _FOO_H_

    #include <type_traits>

    class FooC
    {
    public:
     FooC();
       ~FooC() = default;
    };

    #endif // _FOO_H_

and the corresponding source file Foo.cpp:

    #include "Foo.h"

    FooC::FooC()
    {
    }

I can compile the source file with following command

    C:\\GNU-Tools-ARM-Embedded\\6-2017-q2-update\\bin\\arm-none-eabi-g++.exe -IC:/gnu-tools-arm-embedded/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1 -std=gnu++14 -o Foo.cpp.obj -c Foo.cpp

or

    C:\\GNU-Tools-ARM-Embedded\\7-2018-q2-update\\bin\\arm-none-eabi-g++.exe -IC:/gnu-tools-arm-embedded/7-2018-q2-update/arm-none-eabi/include/c++/7.3.1 -std=gnu++14 -o Foo.cpp.obj -c Foo.cpp

but when I exchange the *-IC:/gnu-tools-arm-embedded/...* with *-isystem C:/gnu-tools-arm-embedded/...*

    C:\\GNU-Tools-ARM-Embedded\\6-2017-q2-update\\bin\\arm-none-eabi-g++.exe -isystem C:/gnu-tools-arm-embedded/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1 -std=gnu++14 -o Foo.cpp.obj -c Foo.cpp

or

    C:\\GNU-Tools-ARM-Embedded\\7-2018-q2-update\\bin\\arm-none-eabi-g++.exe -isystem C:/gnu-tools-arm-embedded/7-2018-q2-update/arm-none-eabi/include/c++/7.3.1 -std=gnu++14 -o Foo.cpp.obj -c Foo.cpp

then I get many compile errors like:

    In file included from Foo.h:4:0,
                     from Foo.cpp:1:
    C:/gnu-tools-arm-embedded/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/type_traits:68:3: error: template with C linkage
       template<typename _Tp, _Tp __v>
       ^~~~~~~~
    ...
        C:/gnu-tools-arm-embedded/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/type_traits:2660:3: error: template with C linkage
           template<typename _Tp>
           ^~~~~~~~

I need this include path and the include of *type_traits* and can not change to *-I*. Does somebody know a nice solution for this problem?

Thanks!

Question information

Language:
English Edit question
Status:
Expired
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
2018-08-01
Last reply:
2018-08-17
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.