Closed raulsmartin closed 4 years ago
What compiler are you using? It's possible I'm missing some define for another compiler. I only test with VS2015 on Windows.
I can also add an option to avoid compiling d3d12 altogether. It's not even fully supported by bgfx yet. Should fix this error for you.
I'm using gcc installed with MinGW Installer. I'm trying to compile with it because I use CLion instead of VS.
That's fine. A few other people have managed to get MinGW working. Can you link me to the specific MinGW installer? There's a couple different ones.
Works fine on Windows with CLion & mingw-w64.
Hello, I am using mingw64 on windows 10, I get the following error:
error: 'UINT64_C' was not declared in this scope
Full stack trace:
Scanning dependencies of target squish
[ 4%] Building CXX object CMakeFiles/ib-compress.dir/bgfx/3rdparty/ib-compress/indexbuffercompression.cpp.obj
[ 4%] Building CXX object CMakeFiles/pvrtc.dir/bimg/3rdparty/pvrtc/BitScale.cpp.obj
[ 4%] Building C object CMakeFiles/iqa.dir/bimg/3rdparty/iqa/source/convolve.c.obj
[ 4%] Building CXX object CMakeFiles/squish.dir/bimg/3rdparty/libsquish/alpha.cpp.obj
In file included from D:\db\bayesian-ai\Dropbox\Tech\cpp\bgfx.cmake\bgfx\3rdparty\ib-compress\indexbuffercompression.h:30:0,
from D:\db\bayesian-ai\Dropbox\Tech\cpp\bgfx.cmake\bgfx\3rdparty\ib-compress\indexbuffercompression.cpp:25:
D:\db\bayesian-ai\Dropbox\Tech\cpp\bgfx.cmake\bgfx\3rdparty\ib-compress\writebitstream.h: In member function 'void WriteBitstream::Write(uint32_t, uint32_t)':
D:\db\bayesian-ai\Dropbox\Tech\cpp\bgfx.cmake\bgfx\3rdparty\ib-compress\writebitstream.h:99:131: error: 'UINT64_C' was not declared in this scope
m_bitBuffer |= ( static_cast<uint64_t>( value ) << ( 64 - m_bitsLeft ) ) & ( m_bitsLeft == 0 ? 0 : UINT64_C(0xFFFFFFFFFFFFFFFF) );
^
CMakeFiles\ib-compress.dir\build.make:62: recipe for target 'CMakeFiles/ib-compress.dir/bgfx/3rdparty/ib-compress/indexbuffercompression.cpp.obj' failed
When using cygwin:
[ 8%] Building CXX object CMakeFiles/bx.dir/bx/src/crtnone.cpp.o
[ 8%] Building CXX object CMakeFiles/pvrtc.dir/bimg/3rdparty/pvrtc/PvrTcDecoder.cpp.o
[ 8%] Building C object CMakeFiles/iqa.dir/bimg/3rdparty/iqa/source/ssim.c.o
[ 13%] Building CXX object CMakeFiles/squish.dir/bimg/3rdparty/libsquish/colourblock.cpp.o
/cygdrive/d/db/bayesian-ai/Dropbox/Tech/cpp/bgfx.cmake/bx/src/crtnone.cpp:15:10: fatal error: crt0.h: No such file or directory
#include "crt0.h"
^~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/bx.dir/build.make:135: CMakeFiles/bx.dir/bx/src/crtnone.cpp.o] Error 1
[ 13%] Building CXX object CMakeFiles/pvrtc.dir/bimg/3rdparty/pvrtc/PvrTcEncoder.cpp.o
make[2]: *** [CMakeFiles/Makefile2:1134: CMakeFiles/bx.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
And when using vc12:
Scanning dependencies of target bx
[ 4%] Building CXX object CMakeFiles/bx.dir/bx/src/allocator.cpp.obj
allocator.cpp
d:\db\bayesian-ai\dropbox\tech\cpp\bgfx.cmake\bx\include\bx\bx.h(35) : error C2144: syntax error : 'bool' should be preceded by ';'
d:\db\bayesian-ai\dropbox\tech\cpp\bgfx.cmake\bx\include\bx\bx.h(46) : error C2146: syntax error : missing ';' before identifier 'Ty'
d:\db\bayesian-ai\dropbox\tech\cpp\bgfx.cmake\bx\include\bx\bx.h(46) : error C2146: syntax error : missing ';' before identifier 'min'
d:\db\bayesian-ai\dropbox\tech\cpp\bgfx.cmake\bx\include\bx\bx.h(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\db\bayesian-ai\dropbox\tech\cpp\bgfx.cmake\bx\include\bx\bx.h(46) : error C2143: syntax error : missing ',' before '&'
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Any help would be appreciated
I've got an error when I was trying to compile bgfx in Windows. This is the following error:
I tried also to compile it with the examples, but the same error occur.