Josko / aura-bot

Warcraft III high-performance hosting bot written in C++14.
75 stars 41 forks source link

Compiling Errors #49

Closed tada5hi closed 7 years ago

tada5hi commented 7 years ago

Hi, first of all nice Project. I really appreciate it, that you guys try to keep Ghost++ bzw. Warcraft 3 alive. First Error:

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DYNAMIC_MODULE=1 ..

Results in:

-- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.7.2 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.7") -- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6") -- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so -- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so - found -- Building dynamic module CMake Error at CMakeLists.txt:311 (target_compile_definitions): Unknown CMake command "target_compile_definitions".

-- Configuring incomplete, errors occurred!

After i uncommented the target line the cmake operation, results a new Error.

After i also uncommented the following line the Build was successfull. Make & make install worked without any Error.

bncsutil make & make install worked without any changes.

The make file in the root Directory resultet in: g++: error: unrecognized command line option ‘-std=c++14’ make: *** [src/bncsutilinterface.o]

Argon- commented 7 years ago

Your version of gcc is way too old. https://gcc.gnu.org/projects/cxx-status.html#cxx14

tada5hi commented 7 years ago

Im running on 4.7.2 is that version too old ? Which one do you recommend ?

gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.2 (Debian 4.7.2-5)

Argon- commented 7 years ago

4.7 is 5 years old. Get the newest you can get.

tada5hi commented 7 years ago

Hi im pretty nooby regarding c++ compiling. Can you give me a Version number you recommend? I browsed in the internet and just found that gcc-6 is available but no higher version and gcc 4.9 seems to be the currently stable version. Im using Debian wheezy if that helps.

Josko commented 7 years ago

GCC 6 would be good enough (with GCC 7 being the latest major version). Newer compiler is usually better so just like Argon- put it - get the newest you can (reasonably) get.