Closed Gryxx closed 3 years ago
Same issue on the latest version of Fedora
I got it to compile with the following patch:
diff --git a/SpaceCadetPinball/options.cpp b/SpaceCadetPinball/options.cpp
index 658e96d..f1fb4c8 100644
--- a/SpaceCadetPinball/options.cpp
+++ b/SpaceCadetPinball/options.cpp
@@ -10,6 +10,13 @@
optionsStruct options::Options{};
+const int options::MaxUps = 360;
+const int options::MaxFps = options::MaxUps;
+const int options::MinUps = 60;
+const int options::MinFps = MinUps;
+const int options::DefUps = 120;
+const int options::DefFps = 60;
+
short options::vk_list[28]
{
-32703,
diff --git a/SpaceCadetPinball/options.h b/SpaceCadetPinball/options.h
index accdbb9..8303029 100644
--- a/SpaceCadetPinball/options.h
+++ b/SpaceCadetPinball/options.h
@@ -58,8 +58,8 @@ class options
{
public:
// Original does ~120 updates per second.
- static constexpr int MaxUps = 360, MaxFps = MaxUps, MinUps = 60, MinFps = MinUps,
- DefUps = 120, DefFps = 60;
+ static const int MaxUps, MaxFps, MinUps, MinFps,
+ DefUps, DefFps;
static optionsStruct Options;
static void init();
There's an open pull request fixing this, you can clone this repo in the meantime:
That PR #12 won’t be merged as is. So I added the fix separately. In my tests, somehow both GCC and Clang compiled with no storage.
https://github.com/k4zmu2a/SpaceCadetPinball/commit/65037e0e69efa7c127fe3ea8a49d3a2a56aca854 fixed the issue for me.
I think the issue can be closed, @Gryxx can you confirm your issue has been solved?
@jeanthom Issue solved, thanks.
Result of compilation
` grzegorz@linux-ebz6:~/Publiczny/git/SpaceCadetPinball/build> make -j 8 [ 2%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/cmake_pch.hxx.gch [ 2%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/imgui_sdl.cpp.o [ 4%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/imgui_demo.cpp.o [ 5%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/imgui_tables.cpp.o [ 8%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/imgui_draw.cpp.o [ 8%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/imgui_impl_sdl.cpp.o [ 10%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/imgui.cpp.o [ 11%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/imgui_widgets.cpp.o [ 20%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/GroupData.cpp.o [ 20%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/control.cpp.o [ 20%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/loader.cpp.o [ 20%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/memory.cpp.o [ 20%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/fullscrn.cpp.o [ 22%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/gdrv.cpp.o [ 22%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/maths.cpp.o [ 22%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/high_score.cpp.o [ 24%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/midi.cpp.o [ 25%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/nudge.cpp.o [ 27%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/options.cpp.o [ 28%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/partman.cpp.o [ 30%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/pb.cpp.o [ 31%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/pinball.cpp.o [ 32%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/proj.cpp.o [ 34%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/render.cpp.o [ 35%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/score.cpp.o [ 37%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/Sound.cpp.o [ 38%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/SpaceCadetPinball.cpp.o [ 40%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TBall.cpp.o [ 41%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TBlocker.cpp.o [ 42%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TBumper.cpp.o [ 44%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TCircle.cpp.o [ 47%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TComponentGroup.cpp.o [ 47%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TCollisionComponent.cpp.o [ 48%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TDemo.cpp.o [ 50%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TDrain.cpp.o [ 51%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TEdgeBox.cpp.o [ 52%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TEdgeManager.cpp.o [ 54%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TEdgeSegment.cpp.o [ 55%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TFlagSpinner.cpp.o [ 58%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TFlipperEdge.cpp.o [ 58%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TFlipper.cpp.o [ 60%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TGate.cpp.o [ 61%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/THole.cpp.o [ 62%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/timer.cpp.o [ 64%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TKickback.cpp.o [ 65%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TKickout.cpp.o [ 67%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TLight.cpp.o [ 70%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TLightBargraph.cpp.o [ 70%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TLightGroup.cpp.o [ 71%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TLightRollover.cpp.o [ 72%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TLine.cpp.o [ 74%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TOneway.cpp.o [ 75%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TPinballComponent.cpp.o [ 77%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TPinballTable.cpp.o [ 78%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TPlunger.cpp.o [ 80%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TPopupTarget.cpp.o [ 81%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TRamp.cpp.o [ 82%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TRollover.cpp.o [ 84%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TSink.cpp.o [ 85%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TSoloTarget.cpp.o [ 87%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TSound.cpp.o [ 88%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TTableLayer.cpp.o [ 90%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TTextBox.cpp.o [ 91%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TTextBoxMessage.cpp.o [ 92%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TTimer.cpp.o [ 94%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TTripwire.cpp.o [ 95%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/TWall.cpp.o [ 97%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/winmain.cpp.o [ 98%] Building CXX object CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/zdrv.cpp.o [100%] Linking CXX executable ../bin/SpaceCadetPinball /usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/SpaceCadetPinball.dir/SpaceCadetPinball/options.cpp.o: in function `options::init()': options.cpp:(.text+0x2c0): undefined reference to `options::MinUps' /usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: options.cpp:(.text+0x2cd): undefined reference to `options::MaxFps' /usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: options.cpp:(.text+0x2f8): undefined reference to `options::MinUps' /usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: options.cpp:(.text+0x305): undefined reference to `options::MaxUps' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/SpaceCadetPinball.dir/build.make:1310: ../bin/SpaceCadetPinball] Błąd 1 make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/SpaceCadetPinball.dir/all] Błąd 2 make: *** [Makefile:91: all] Błąd 2 `No errors during cmake. System is openSUSE Tumbleweed. Development libraries fro SDL2 and SDL2_mixer are installed. Help appreciated.