OctaneGUI icon indicating copy to clipboard operation
OctaneGUI copied to clipboard

Compilation error GNU 13.2.1

Open seb777 opened this issue 2 years ago • 0 comments

I use the linux OS (archlinux x86_64) with the GCC compiler:

-- The C compiler identification is GNU 13.2.1 -- The CXX compiler identification is GNU 13.2.1 Desired windowing library: SDL2 Desired rendering library: OpenGL

1- First, I get the following compilation error:

/home/seb/Projets/OctaneGUI/Source/OctaneGUI/Controls/TextInput.cpp: In member function 'void OctaneGUI::TextInput::AddText(const std::u32string&)':
/home/seb/Projets/OctaneGUI/Source/OctaneGUI/Controls/TextInput.cpp:1033:39: error: redundant move in initialization [-Werror=redundant-move]
 1033 |     std::u32string Pending = std::move(Contents);
      |                              ~~~~~~~~~^~~~~~~~~~
/home/seb/Projets/OctaneGUI/Source/OctaneGUI/Controls/TextInput.cpp:1033:39: note: remove 'std::move' call
cc1plus: all warnings being treated as errors
make[2]: *** [Source/OctaneGUI/CMakeFiles/OctaneGUI.dir/build.make:524: Source/OctaneGUI/CMakeFiles/OctaneGUI.dir/Controls/TextInput.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:282: Source/OctaneGUI/CMakeFiles/OctaneGUI.dir/all] Error 2

2- I then added the option (it's probably not the best solution) -Wno-redundant-move in the CMake directives.

I now get the following compilation error:

In file included from /home/seb/Projets/OctaneGUI/Apps/Tests/Rect.cpp:27:
/home/seb/Projets/OctaneGUI/Apps/Tests/TestSuite.h:56:82: error: 'uint32_t' has not been declared
   56 |     static bool Run(OctaneGUI::Application& Application, const TestSuite& Suite, uint32_t& Passed, uint32_t& Failed);
      |                                                                                  ^~~~~~~~
/home/seb/Projets/OctaneGUI/Apps/Tests/TestSuite.h:56:100: error: 'uint32_t' has not been declared
   56 |     static bool Run(OctaneGUI::Application& Application, const TestSuite& Suite, uint32_t& Passed, uint32_t& Failed);
      |                                                                                                    ^~~~~~~~
make[2]: *** [Apps/Tests/CMakeFiles/Tests.dir/build.make:230: Apps/Tests/CMakeFiles/Tests.dir/Rect.cpp.o] Error 1

3- I've added the standard library header cstdint to TestSuite.h. Compilation then proceeds without error, and the test applications appear to work as expected :+1: :grinning:

seb777 avatar Aug 26 '23 09:08 seb777