Skip to content

Instantly share code, notes, and snippets.

@liori
Last active September 27, 2018 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liori/9193640ea47b122c93d11665b48c24d5 to your computer and use it in GitHub Desktop.
Save liori/9193640ea47b122c93d11665b48c24d5 to your computer and use it in GitHub Desktop.
liori:~/tmp/keybtest% LANG= make Source2 CXXFLAGS=-std=c++17 pts/5 14:19:37
g++ -std=c++17 Source2.cpp -o Source2
Source2.cpp:11:6: error: 'atomic_uint32_t' in namespace 'std' does not name a type
std::atomic_uint32_t SCR_WIDTH = 800;
^~~~~~~~~~~~~~~
Source2.cpp:12:6: error: 'atomic_uint32_t' in namespace 'std' does not name a type
std::atomic_uint32_t SCR_HEIGHT = 600;
^~~~~~~~~~~~~~~
Source2.cpp:35:6: error: 'atomic_int32_t' in namespace 'std' does not name a type
std::atomic_int32_t mousex = 0, mousey = 0;
^~~~~~~~~~~~~~
Source2.cpp: In function 'void mouse_cursor_callback(GLFWwindow*, double, double)':
Source2.cpp:47:2: error: 'mousex' was not declared in this scope
mousex = (int)xpos;
^~~~~~
Source2.cpp:48:2: error: 'mousey' was not declared in this scope
mousey = (int)ypos;
^~~~~~
Source2.cpp: In function 'int main()':
Source2.cpp:82:28: error: 'SCR_WIDTH' was not declared in this scope
window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "input test", nullptr, nullptr);
^~~~~~~~~
Source2.cpp:82:39: error: 'SCR_HEIGHT' was not declared in this scope
window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "input test", nullptr, nullptr);
^~~~~~~~~~
<builtin>: recipe for target 'Source2' failed
make: *** [Source2] Error 1
liori:~/tmp/keybtest% LANG= make Source2 CXXFLAGS=-std=c++14 CXX=clang pts/5 14:14:29
clang -std=c++14 Source2.cpp -o Source2
Source2.cpp:11:6: error: no template named 'atomic_uint32_t' in namespace 'std'; did you mean 'atomic_init'?
std::atomic_uint32_t SCR_WIDTH = 800;
~~~~~^~~~~~~~~~~~~~~
atomic_init
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/atomic:944:5: note: 'atomic_init' declared here
atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept
^
Source2.cpp:11:6: error: no type named 'atomic_uint32_t' in namespace 'std'
std::atomic_uint32_t SCR_WIDTH = 800;
~~~~~^
Source2.cpp:12:6: error: no template named 'atomic_uint32_t' in namespace 'std'; did you mean 'atomic_init'?
std::atomic_uint32_t SCR_HEIGHT = 600;
~~~~~^~~~~~~~~~~~~~~
atomic_init
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/atomic:944:5: note: 'atomic_init' declared here
atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept
^
Source2.cpp:12:6: error: no type named 'atomic_uint32_t' in namespace 'std'
std::atomic_uint32_t SCR_HEIGHT = 600;
~~~~~^
Source2.cpp:35:6: error: no template named 'atomic_int32_t' in namespace 'std'; did you mean 'atomic_init'?
std::atomic_int32_t mousex = 0, mousey = 0;
~~~~~^~~~~~~~~~~~~~
atomic_init
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/atomic:944:5: note: 'atomic_init' declared here
atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept
^
Source2.cpp:35:6: error: no type named 'atomic_int32_t' in namespace 'std'
std::atomic_int32_t mousex = 0, mousey = 0;
~~~~~^
Source2.cpp:35:39: error: expected ';' after top level declarator
std::atomic_int32_t mousex = 0, mousey = 0;
^
;
Source2.cpp:48:2: error: use of undeclared identifier 'mousey'; did you mean 'mousex'?
mousey = (int)ypos;
^~~~~~
mousex
Source2.cpp:35:21: note: 'mousex' declared here
std::atomic_int32_t mousex = 0, mousey = 0;
^
8 errors generated.
<builtin>: recipe for target 'Source2' failed
make: *** [Source2] Error 1
liori:~/tmp/keybtest% gcc -v pts/5 14:14:42
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --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 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
liori:~/tmp/keybtest% clang -v pts/5 14:14:45
clang version 3.8.1-24 (tags/RELEASE_381/final)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment