Ad
  • Default User Avatar

    Not a kata issue but a problem in your code: please review the C++ basics.

  • Custom User Avatar

    C++
    It seems that the linker is unable to find the definition of the DigPow::digPow function, resulting in the "undefined reference" error.

    "/tmp/main-7834c7.o: In function dotest(int, int, int)': main.cpp:(.text+0xa): undefined reference to DigPow::digPow(int, int)'
    /tmp/main-7834c7.o: In function digPow_Tests::Fixed__Tests()': main.cpp:(.text._ZN12digPow_Tests12Fixed__TestsEv[_ZN12digPow_Tests12Fixed__TestsEv]+0x12): undefined reference to DigPow::digPow(int, int)'
    main.cpp:(.text._ZN12digPow_Tests12Fixed__TestsEv[_ZN12digPow_Tests12Fixed__TestsEv]+0x72): undefined reference to DigPow::digPow(int, int)' main.cpp:(.text._ZN12digPow_Tests12Fixed__TestsEv[_ZN12digPow_Tests12Fixed__TestsEv]+0xd2): undefined reference to DigPow::digPow(int, int)'
    main.cpp:(.text._ZN12digPow_Tests12Fixed__TestsEv[_ZN12digPow_Tests12Fixed__TestsEv]+0x132): undefined reference to `DigPow::digPow(int, int)'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)"

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution