Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-10343

Compiler does not support linking code that uses C++ exceptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium

      These three commands show the source code, build it without exceptions, then build it with exceptions.

      C:\working_directory>type hello.cpp
      #include <iostream>
      
      int main()
      {
         std::cout << "Hello, world!" << std::endl;
         return 0;
      }
      
      C:\working_directory>tiarmclang -mcpu=cortex-m0 hello.cpp -o hello.out -Wl,-c
      
      C:\working_directory>tiarmclang -fexceptions -mcpu=cortex-m0 hello.cpp -o hello.out -Wl,-c
      
      undefined              first referenced
        symbol                    in file
      ---------              ----------------
      _Unwind_Resume         C:\Users\name\AppData\Local\Temp\hello-81da66.o
      __aeabi_unwind_cpp_pr0 C:\Users\name\AppData\Local\Temp\hello-81da66.o
      __cxa_begin_catch      C:\Users\name\AppData\Local\Temp\hello-81da66.o
      __cxa_end_catch        C:\Users\name\AppData\Local\Temp\hello-81da66.o
      __gxx_personality_v0   C:\Users\name\AppData\Local\Temp\hello-81da66.o
      
      error: unresolved symbols remain
      error: errors encountered during linking; "hello.out" not built
      tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
      
      

      The no exceptions build is clean. The exceptions build has problems when linking.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: