Menu

no unused local typedef warning option

2016-07-26
2016-07-26
  • Bradley S. Meyer

    Post moved from here:

    Dear Prof. Meyer
    Thank you for your reply.
    I tried it but there are some error,so I obtained the log like below.
    Best wishes
    tar xz -C ../../vendor -f ../../vendor/wn_matrix.tar.gz
    g++ -Werror -Wall -Wpointer-arith -Wcast-qual -Wwrite-strings -fshort-enums -fno-common -g -Wno-error=unused-local-typedef -O0 -DNO_OPENMP -Wno-deprecated -DHYDRO_EXP_EXPANSION -Wno-error=sign-compare xml2-config --cflags gsl-config --cflags -I../../vendor/libnucnet/0.28/src -I../../vendor/wn_matrix/0.18/src -I../../vendor/libstatmech/0.9/src -I../../vendor/libnuceq/0.6/src -I../.. -I ../../vendor/wn_sparse_solve/0.5/src -c ../../vendor/wn_matrix/0.18/src/WnMatrix.c -o ../../obj/WnMatrix.o
    error: unknown warning option '-Werror=unused-local-typedef' [-Werror,-Wunknown-warning-option]
    make: *** [../../obj/WnMatrix.o] Error 1

     
    • Bradley S. Meyer

      I am assuming you are running on a mac. In recent versions of clang (3.6 and later), the compiler warns about unused local typedefs. Boost has some issues with this, so the nucnet-tools-code/build/Makefile checks for clang and turns off the warning as an error.

      You probably have an old version of clang (<3.6) so the compiler doesn't know about this warning. You can either

      1) Remove the lines

        # Temporarily ignore unused local typedefs in clang as errors until
        # boost fixes this.
      
        ifneq "$(CLANG_TEST)" ""
          CFLAGS+= -Wno-error=unused-local-typedef
        endif
      

      in nucnet-tools-code/build/Makefile and then try recompiling or

      2) Update your version of clang--probably by updating your version of XCode.

      The second is clearly preferable. Alternatively, you can use gcc.

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.