Closed rachelnertia closed 6 years ago
Hello @rachelnertia !
I just tried building the Quiver workspace on Linux Ubuntu version 16.04 LTS and it failed :(. I had around 10 errors, which I can try and fix. Thought i'd give it a shot before I came to C++ meetup Edinburgh to see your talk!
P.S ive just about gotten really stuck into C++ and so I thought this would be a good challenge!
I used Premake5 like specified and generated the files for CodeLite as opposed to vs2017.
This is the stack trace if it helps you at all:
/bin/sh -c '/usr/bin/make -j8 -e -f "Quiver.mk" MakeIntermediateDirs && /usr/bin/make -j8 -e -f "Quiver.mk" all'
----------Building project:[ Quiver - Debug ]----------
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationData.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimationData.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationEditor.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimationEditor.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationId.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimationId.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationLibrary.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimationLibrary.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationSystem.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimationSystem.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimatorId.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimatorId.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/Rect.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_Rect.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Application/Application.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Application_Application.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Audio/AudioLibrary.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Audio_AudioLibrary.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Audio/Listener.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Audio_Listener.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationLibrary.cpp: In member function 'bool qvr::AnimationLibrary::Remove(qvr::AnimationId)':
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationLibrary.cpp:112:14: error: 'class std::unordered_map<qvr::AnimationId, qvr::AnimationLibrary::AnimationInfo>' has no member named 'insert_or_assign'
infosById.insert_or_assign(kvp.first, newAnimInfo);
^
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationLibrary.cpp:126:14: error: 'class std::unordered_map<qvr::AnimationId, qvr::AnimationLibrary::AnimationInfo>' has no member named 'insert_or_assign'
infosById.insert_or_assign(kvp.first, newAnimInfo);
^
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Entity/Entity.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Entity_Entity.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationSystem.cpp: In member function 'void qvr::AnimationSystem::AnimatorGui(qvr::AnimatorId)':
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationSystem.cpp:180:48: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'const qvr::AnimatorId' [-Wformat=]
ImGui::Text("Animator #%u does not exist", id);
^
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationSystem.cpp:186:60: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'const qvr::AnimationId' [-Wformat=]
ImGui::Text("Animation: \t#%u", animator.currentAnimation);
^
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationSystem.cpp:187:53: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'qvr::AnimatorTarget*' [-Wformat=]
ImGui::Text("Target Rect:\t0x%08X", animator.target);
^
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quiver/Quiver/Entity/EntityEditor.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Entity_EntityEditor.cpp.o -I. -I../Source/Quiver -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/ImGui -I../External/cxxopts -I../External/Optional -I../~/Application/SFML-2.4.2include
Quiver.mk:128: recipe for target '../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimationLibrary.cpp.o' failed
make: *** [../Build/Obj/Quiver/Debug/up_Source_Quiver_Quiver_Animation_AnimationLibrary.cpp.o] Error 1
make: *** Waiting for unfinished jobs....
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Entity/EntityEditor.cpp: In member function 'void qvr::EntityEditor::GuiControls()':
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Entity/EntityEditor.cpp:25:56: warning: cast from 'qvr::Entity*' to 'unsigned int' loses precision [-fpermissive]
ImGui::Text("Entity Address: %p", (unsigned)(&m_Entity));
^
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Entity/EntityEditor.cpp:25:57: warning: format '%p' expects argument of type 'void*', but argument 2 has type 'unsigned int' [-Wformat=]
ImGui::Text("Entity Address: %p", (unsigned)(&m_Entity));
^
====2 errors, 5 warnings====
/bin/sh -c '/usr/bin/make -j8 -e -f "Quarrel.mk" MakeIntermediateDirs && /usr/bin/make -j8 -e -f "Quarrel.mk" all'
----------Building project:[ Quarrel - Debug ]----------
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quarrel/PlayerInput.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quarrel/Debug/up_Source_Quarrel_PlayerInput.cpp.o -I. -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quarrel/main.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quarrel/Debug/up_Source_Quarrel_main.cpp.o -I. -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quarrel/Weapon.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Weapon.cpp.o -I. -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quarrel/Enemy.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Enemy.cpp.o -I. -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quarrel/WorldExit.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quarrel/Debug/up_Source_Quarrel_WorldExit.cpp.o -I. -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quarrel/Wanderer.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Wanderer.cpp.o -I. -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/Quarrel/Player.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -o ../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Player.cpp.o -I. -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
In file included from /home/digital/Documents/Quiver/Source/Quarrel/Weapon.cpp:1:0:
/home/digital/Documents/Quiver/Source/Quarrel/Weapon.h:93:2: error: array must be initialized with a brace-enclosed initializer
};
^
/home/digital/Documents/Quiver/Source/Quarrel/Weapon.h:93:2: error: too many initializers for 'const std::array<Crossbow::QuarrelTypeInfo, 3ul>'
In file included from /home/digital/Documents/Quiver/Source/Quarrel/Player.h:6:0,
from /home/digital/Documents/Quiver/Source/Quarrel/main.cpp:5:
/home/digital/Documents/Quiver/Source/Quarrel/Weapon.h:93:2: error: array must be initialized with a brace-enclosed initializer
};
^
/home/digital/Documents/Quiver/Source/Quarrel/Weapon.h:93:2: error: too many initializers for 'const std::array<Crossbow::QuarrelTypeInfo, 3ul>'
In file included from /home/digital/Documents/Quiver/Source/Quarrel/Player.h:6:0,
from /home/digital/Documents/Quiver/Source/Quarrel/Player.cpp:1:
/home/digital/Documents/Quiver/Source/Quarrel/Weapon.h:93:2: error: array must be initialized with a brace-enclosed initializer
};
^
/home/digital/Documents/Quiver/Source/Quarrel/Weapon.h:93:2: error: too many initializers for 'const std::array<Crossbow::QuarrelTypeInfo, 3ul>'
Quarrel.mk:143: recipe for target '../Build/Obj/Quarrel/Debug/up_Source_Quarrel_main.cpp.o' failed
make: *** [../Build/Obj/Quarrel/Debug/up_Source_Quarrel_main.cpp.o] Error 1
make: *** Waiting for unfinished jobs....
Quarrel.mk:127: recipe for target '../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Weapon.cpp.o' failed
make: *** [../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Weapon.cpp.o] Error 1
Quarrel.mk:103: recipe for target '../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Player.cpp.o' failed
make: *** [../Build/Obj/Quarrel/Debug/up_Source_Quarrel_Player.cpp.o] Error 1
====8 errors, 8 warnings====
/bin/sh -c '/usr/bin/make -j8 -e -f "QuiverApp.mk" MakeIntermediateDirs && /usr/bin/make -j8 -e -f "QuiverApp.mk" all'
----------Building project:[ QuiverApp - Debug ]----------
/usr/bin/g++ -o ../Build/QuiverApp/QuiverApp_Debug @"QuiverApp.txt" -L. ../Build/Quiver/libQuiver_Debug.a ../Build/Box2D/libBox2D_Debug.a ../Build/ImGui-SFML/libImGui-SFML_Debug.a -lsfml-system-s-d -lsfml-window-s-d -lsfml-graphics-s-d -lsfml-audio-s-d -lwinmm -lgdi32 -lopenal32 -lflac -lvorbisenc -lvorbisfile -lvorbis -logg -lfreetype -ljpeg -lGL
g++: error: @QuiverApp.txt: No such file or directory
g++: error: ../Build/Quiver/libQuiver_Debug.a: No such file or directory
QuiverApp.mk:74: recipe for target '../Build/QuiverApp/QuiverApp_Debug' failed
make: *** [../Build/QuiverApp/QuiverApp_Debug] Error 1
====8 errors, 8 warnings====
/bin/sh -c '/usr/bin/make -j8 -e -f "QuiverTests.mk" MakeIntermediateDirs && /usr/bin/make -j8 -e -f "QuiverTests.mk" all'
----------Building project:[ QuiverTests - Debug ]----------
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/QuiverTests/CatchMain.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -DCATCH_CPP11_OR_GREATER -o ../Build/Obj/QuiverTests/Debug/up_Source_QuiverTests_CatchMain.cpp.o -I. -I../External/Catch -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/usr/bin/g++ -c "/home/digital/Documents/Quiver/Source/QuiverTests/ExampleTest.cpp" -O0 -g -std=c++14 --std=c++1z -fpermissive -DDEBUG -D_DEBUG -DDO_GL_CHECK -DSFML_STATIC -DCATCH_CPP11_OR_GREATER -o ../Build/Obj/QuiverTests/Debug/up_Source_QuiverTests_ExampleTest.cpp.o -I. -I../External/Catch -I../Source/Quiver -I../External/ImGui -I../External/json -I../External/spdlog/include -I../External/Box2D -I../External/Optional -I../~/Application/SFML-2.4.2include
/home/digital/Documents/Quiver/Source/QuiverTests/ExampleTest.cpp:1:21: fatal error: Catch.hpp: No such file or directory
compilation terminated.
QuiverTests.mk:103: recipe for target '../Build/Obj/QuiverTests/Debug/up_Source_QuiverTests_ExampleTest.cpp.o' failed
make: *** [../Build/Obj/QuiverTests/Debug/up_Source_QuiverTests_ExampleTest.cpp.o] Error 1
make: *** Waiting for unfinished jobs....
/home/digital/Documents/Quiver/Source/QuiverTests/CatchMain.cpp:2:21: fatal error: Catch.hpp: No such file or directory
compilation terminated.
QuiverTests.mk:95: recipe for target '../Build/Obj/QuiverTests/Debug/up_Source_QuiverTests_CatchMain.cpp.o' failed
make: *** [../Build/Obj/QuiverTests/Debug/up_Source_QuiverTests_CatchMain.cpp.o] Error 1
====10 errors, 8 warnings====
Hi! This is great, thanks for posting. At a glance these all look easily fixable so I'll see if I can bash together a CL to fix them all.
@rachelnertia CL as in Common Language right? I haven't the faintest clue how to even do that :stuck_out_tongue:! Got any pointers? would love to help out a bit more!
CL = Changelist, sorry. Perforce terminology.
This would be a good place to start:
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationLibrary.cpp: In member function 'bool qvr::AnimationLibrary::Remove(qvr::AnimationId)':
/home/digital/Documents/Quiver/Source/Quiver/Quiver/Animation/AnimationLibrary.cpp:112:14: error: 'class std::unordered_map<qvr::AnimationId, qvr::AnimationLibrary::AnimationInfo>' has no member named 'insert_or_assign'
infosById.insert_or_assign(kvp.first, newAnimInfo);
^
std::unordered_map::insert_or_assign isn't added to the standard library until C++17, so isn't available on g++ (gcc) with -std=c++14. Which is correct. MSVC is incorrect and provides insert_or_assign
even when compiling with /std:c++14, which means I never realised I'd written code that would only compile on MSVC. See this Compiler Explorer example.
Just replace the call(s) to insert_or_assign
with equivalent code. Good luck!
@rachelnertia Fixed all the insert_or_assign errors! Now trying to fix the last few errors in the WorldRaycastRenderer.cpp file, which has to do with the setUniform function not existing in the sf::Shader namespace. It wants me to use setParameter instead, which is now deprecated. Should I still go for it? I see there is a ticket already to upgrade SFML, which I think would fix this issue.
There isn't a ticket to upgrade SFML. It sounds like you're using the wrong version of SFML - are you sure you're building with SFML 2.4.2?
@rachelnertia yup, you're right, im using the wrong version of SFML. I had gotten it through the debian package manager, which installed 2.3.2. This is because of the version of Ubuntu I am running, which is xenial. In order to get 2.4.2 I need to have Artful instead of Xenial, which I wont be able to do since my linux machine is my work laptop :(. I have been building it from source instead, so some progress has been done on that front.
Closed thanks to @TartanLlama in #17!
I only have Windows set up at the moment and I've probably broken the Linux build again. I'd really appreciate if someone could get it working again.