Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Various fixes for building on linux

Open lanodan opened this issue 1 year ago • 4 comments

  • CMake: Remove hardcoding of C & C++ compiler executables
  • Rename min/max to MIN/MAX
  • CMake: Use string-append rather than list-append for flags
  • osiris_import.h: Don't redefine size_t
  • netcon/includes/inetgetfile.h: Comment <linux/ipx.h>
  • Chttpget.cpp: Fix return type
  • CMake: Add -std=c++98 to C++ flags

lanodan avatar Apr 17 '24 07:04 lanodan

Doesn't build :-(

[  7%] Building CXX object d3music/CMakeFiles/d3music.dir/musicapi.o
/home/ei-grad/repos/github.com/kevinbentley/Descent3/d3music/musicapi.cpp:167:58: error: macro "MIN" requires 2 arguments, but only 1 given
  167 |   const float kEpsilon = std::numeric_limits<float>::MIN();
      |                                                          ^
In file included from /home/ei-grad/repos/github.com/kevinbentley/Descent3/d3music/musicapi.cpp:3:
/home/ei-grad/repos/github.com/kevinbentley/Descent3/lib/Macros.h:54: note: macro "MIN" defined here
   54 | #define MIN(a, b) (((a) < (b)) ? (a) : (b))
      | 
/home/ei-grad/repos/github.com/kevinbentley/Descent3/d3music/musicapi.cpp: In function 'void D3MusicSetVolume(float)':
/home/ei-grad/repos/github.com/kevinbentley/Descent3/d3music/musicapi.cpp:167:54: error: 'MIN' is not a member of 'std::numeric_limits<float>'
  167 |   const float kEpsilon = std::numeric_limits<float>::MIN();
      |                                                      ^~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-address-of-temporary' may have been intended to silence earlier diagnostics
make[2]: *** [d3music/CMakeFiles/d3music.dir/build.make:76: d3music/CMakeFiles/d3music.dir/musicapi.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1200: d3music/CMakeFiles/d3music.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

ei-grad avatar Apr 17 '24 12:04 ei-grad

ef1c30a226e9f6887b5cb648c27a8f919f63936d conflicts with #23

Lgt2x avatar Apr 17 '24 15:04 Lgt2x

There numerous merge conflicts already. It's worth to wait #45 and try on base of main branch.

winterheart avatar Apr 17 '24 21:04 winterheart

ef1c30a conflicts with #23

@lanodan Can you rebase and resolve?

JeodC avatar Apr 17 '24 23:04 JeodC

So I've reviewed each commit in this PR and each one has already been fixed by another PR. You can safely close this PR with merging.

GravisZro avatar Apr 18 '24 16:04 GravisZro