FWGS / xash3d-fwgs

Xash3D FWGS engine
1.58k stars 241 forks source link

Can't compile because STDINT_H macro is not resolved #1818

Closed jiffygist closed 2 months ago

jiffygist commented 2 months ago

I'm configuring and compiling the project like this

./waf configure -T release -8
./waf install --destdir=/home/herman/prog/build/xash-hl/

However, I'm getting lots of errors related to #include STDINT_H and missing #include <cstdint>, e.g.

[207/283] Compiling 3rdparty/mainui/utflib.cpp
18:08:06 runner ['/usr/bin/g++', '-MMD', '-g', '-fvisibility=hidden', '-O3', '-fno-semantic-interposition', '-fno-rtti', '-fPIC', '-fdiagnostics-color=always', '-Werror=bool-compare', '-Werror=bool-operation', '-Werror=cast-align=strict', '-Werror=duplicated-cond', '-Werror=format-extra-args', '-Werror=implicit-fallthrough=2', '-Werror=logical-op', '-Werror=nonnull', '-Werror=packed', '-Werror=packed-not-aligned', '-Werror=parentheses', '-Werror=return-type', '-Werror=sequence-point', '-Werror=sizeof-pointer-memaccess', '-Werror=sizeof-array-div', '-Werror=sizeof-pointer-div', '-Werror=strict-aliasing', '-Werror=string-compare', '-Werror=tautological-compare', '-Werror=use-after-free=3', '-Werror=vla', '-Werror=write-strings', '-Walloc-zero', '-Wformat=2', '-Winit-self', '-Wmisleading-indentation', '-Wstringop-overflow', '-Wunused-function', '-Wunused-variable', '-Wunused-but-set-variable', '-I3rdparty/mainui', '-I../3rdparty/mainui', '-I3rdparty/mainui/miniutl', '-I../3rdparty/mainui/miniutl', '-I3rdparty/mainui/font', '-I../3rdparty/mainui/font', '-I3rdparty/mainui/controls', '-I../3rdparty/mainui/controls', '-I3rdparty/mainui/menus', '-I../3rdparty/mainui/menus', '-I3rdparty/mainui/model', '-I../3rdparty/mainui/model', '-I3rdparty/mainui/sdk_includes/common', '-I../3rdparty/mainui/sdk_includes/common', '-I3rdparty/mainui/sdk_includes/engine', '-I../3rdparty/mainui/sdk_includes/engine', '-I3rdparty/mainui/sdk_includes/public', '-I../3rdparty/mainui/sdk_includes/public', '-I3rdparty/mainui/sdk_includes/pm_shared', '-I../3rdparty/mainui/sdk_includes/pm_shared', '-I/usr/include/freetype2', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-DXASH_GAMEDIR="valve"', '-DHAVE_LARGEFILE=1', '-DHAVE_OPUS=1', '-DXASH_LOW_MEMORY=0', '-DMAINUI_USE_CUSTOM_FONT_RENDER=1', '-DHAVE_FT2=1', '-DHAVE_FC=1', '-DMAINUI_USE_FREETYPE=1', '../3rdparty/mainui/utflib.cpp', '-c', '-o/home/herman/prog/build/xash3d-fwgs/build/3rdparty/mainui/utflib.cpp.1.o']
In file included from ../3rdparty/mainui/utflib.cpp:15:
../3rdparty/mainui/utflib.h:18:10: error: #include expects "FILENAME" or <FILENAME>
   18 | #include STDINT_H
      |          ^~~~~~~~
In file included from ../3rdparty/mainui/utflib.cpp:16:
../3rdparty/mainui/sdk_includes/common/xash3d_types.h:16:10: error: #include expects "FILENAME" or <FILENAME>
   16 | #include STDINT_H
      |          ^~~~~~~~
../3rdparty/mainui/utflib.h:23:9: error: ‘uint32_t’ does not name a type
   23 |         uint32_t uc;
      |         ^~~~~~~~
../3rdparty/mainui/utflib.h:20:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   19 | #include <stddef.h>
  +++ |+#include <cstdint>
jiffygist commented 2 months ago

If I build mainui separately with cmake it builds ok. Idk how to make xash use it though.

a1batross commented 2 months ago

Post whole build log (after running clean) and config.log in build directory.

чт, 26 сент. 2024 г., 20:19 Herman @.***>:

If I build mainui separately with cmake it builds ok. Idk how to make xash use it though.

— Reply to this email directly, view it on GitHub https://github.com/FWGS/xash3d-fwgs/issues/1818#issuecomment-2377271208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYQTAKJEY67RF64RAWG5X3ZYQQYRAVCNFSM6AAAAABO5HFHQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZXGI3TCMRQHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jiffygist commented 2 months ago

Configure with -vv: https://files.catbox.moe/iu5vbx.txt Build with -vv: https://files.catbox.moe/098qj5.txt

jiffygist commented 2 months ago

@a1batross oh sorry this is totally my mistake, I forgot to update submodules... After I did it builds ok