Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes for building on linux #33

Closed
wants to merge 7 commits into from

Conversation

lanodan
Copy link

@lanodan lanodan commented Apr 17, 2024

  • 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 added 7 commits April 17, 2024 09:53
This avoids conflicts with gcc headers.

  $ git grep -l -z -E '\b(min|max)\(' | xargs -0 sed -i -e 's;\bmin(;MIN(;g' -e 's;\bmax(;MAX(;g'
Otherwise it ends up being semi-colon separated, meaning command separation.
@ei-grad
Copy link
Contributor

ei-grad commented Apr 17, 2024

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

@Lgt2x
Copy link
Member

Lgt2x commented Apr 17, 2024

ef1c30a conflicts with #23

@winterheart
Copy link
Collaborator

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

@JeodC JeodC added this to the All platforms building milestone Apr 17, 2024
@JeodC
Copy link
Collaborator

JeodC commented Apr 17, 2024

ef1c30a conflicts with #23

@lanodan Can you rebase and resolve?

@GravisZro
Copy link
Contributor

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.

@Lgt2x Lgt2x closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants