Qt 5.1 Beta Error using std::atomic c++11 feature - c++

I have just started to work with QT and am still getting familiar with the compilation process. Currently, I am trying to port an existing QT project to Mac. This app compiles and runs on Linux and Windows.
When I compile the project on Mac OSX 10.8.2 , I am getting this c++11 related error ,
#include ../xxx/pch.h:71:10: fatal error: 'atomic' file not found
#include <atomic>
^
1 error generated.
make[1]: *** [debug/xxx/objective-c++.pch] Error 1
make: *** [debug] Error 2
11:32:01: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project xxx (kit: Qt5.1.0)
When executing step 'Make'
I have included the below flags in the.pro file to enable c++11 ,
QMAKE_CXXFLAGS += -std=c++11
CONFIG += c++11
I am building the project with the pre-built QT5.1Beta package (Clang) which I believe has c++11 enabled.
I see the atomic header in the below locations
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/atomic
and in /usr/lib/c++/v1/atomic
I tried testing by including the complete path ,
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr//lib/c++/v1/atomic
I am getting the below error,
In file included from ../xxx/pch.h:71:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/atomic:535:2:
error: atomic is not implemented
In file included from ../xxx/pch.h:124:
../../../yyy.h:308:12: error: no type named 'atomic' in namespace 'std'
std::atomic<bool> m_signaled;
What am I missing here?

Add also
macx:QMAKE_CXXFLAGS += -stdlib=libc++
macx:QMAKE_LFLAGS += -stdlib=libc++

Maybe it is a bit late, but I fixed it using the -std=gnu++0x flag

Related

can't compile a code with -m32 flag in makefile - missing opensslconf-i386.h centos 7

I am trying to compile a code that uses openssl libraries. however, if I compile with -m32 flag, I get the following error:
make > make.txt
In file included from /usr/include/openssl/e_os2.h:56:0,
from /usr/include/openssl/bio.h:62,
from /home/dolf/gsoap-linux-2.7.17/stdsoap2.h:665,
from obj/../otamStub.h:13,
from obj/../otamH.h:10,
from obj/../otamC.cpp:13:
/usr/include/openssl/opensslconf.h:13:30: fatal error: opensslconf-i386.h: No such file or directory
#include "opensslconf-i386.h"
^
compilation terminated.
make[1]: *** [obj/otamC.o] Error 1
make: *** [all] Error 2
I have CentOS version 7.9.2009
I have installed openssl-devel, openssl, openssl-libs, openssl-devel-1.0.2k-25.el7_9.x86_64
those packages should installed the header file I am missing.
any clue on how to fix such issue?
thanks,
Dolf

C++ SFML src/Utility/FileSystem.hpp:8:36: fatal error

I tried to install SFML with the help of this tutorial because I couldn't find a way to install it myself. After I did CTRL + B and Run build & debug I got this error:
⬤ Build & Run: Debug (target: sfml-vscode-boilerplate.exe)
src/PCH.hpp
In file included from src/PCH.hpp:66:0:
src/Utility/FileSystem.hpp:8:36: fatal error: experimental/filesystem: No such file or directory
#include <experimental/filesystem>
^
compilation terminated.
Makefile:313: recipe for target 'bin/Debug/obj/PCH.hpp.gch' failed
mingw32-make[1]: *** [bin/Debug/obj/PCH.hpp.gch] Error 1
Makefile:262: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
✘ Failed!
Review the compile errors above.
I'm using Windows 10, g++ version 6.3.0, SFML version 2.5.1, Visual Studo Code
Okay it was just bad version of GCC and G++

Arduino due BOSSAC source code build using the source tree makefile

I have downloaded the bossa source code from - https://github.com/shumatech/BOSSA/tree/arduino
I installed Cygwin for windows and built the source code from the Cygwin shell by executing the following make command:
make OS=MINGW32_NT-6.1
I get the following error:
In file included from src/WinPortFactory.h:33:0,
from src/WinPortFactory.cpp:29:
src/PortFactory.h:59:2: error: #error "Platform is not supported"
#error "Platform is not supported"
^
Makefile:180: recipe for target 'obj/WinPortFactory.o' failed
make: *** [obj/WinPortFactory.o] Error 1
After inspecting the PortFactory.h file, I see a pre processor directive __WIN32__.
I have tried to include that in my build as follows and get no success:
make OS=MINGW32_NT-6.1 CPPFLAGS=-D__WIN32__
What am I missing? I have CFLAGS and CXXFLAGS as well and get no success.

Compile cling bug

I'm trying to compile Cling (followed build instructions) and i'm unable to find bug reports maillist:
llvm[4]: Compiling AutoSynthesizer.cpp for Debug+Asserts build
llvm[4]: Compiling AutoloadCallback.cpp for Debug+Asserts build
/Users/asmirnov/Documents/dev/src/llvm_cling/tools/cling/lib/Interpreter/AutoloadCallback.cpp:16:67: error:
expected a class or namespace
= sema.getDiagnostics().getCustomDiagID (DiagnosticsEngine::Level::Warning,
~~~~~~~~~~~~~~~~~~~^
1 error generated.
make[4]: *** [/Users/asmirnov/Documents/dev/src/llvm_cling_build/tools/cling/lib/Interpreter/Debug+Asserts/AutoloadCallback.o] Error 1
Use -enable-cxx11 configure option. Updated build tutorial after it.

Error building llvm 3.0

I was trying to get llvm 3.0 on my machine, but I get the following errors when I give make -k.
chethan#ubuntu:~/llvm-3.0$ make
make[1]: Entering directory `/home/chethan/llvm-3.0/lib/Support'
llvm[1]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/SmallVector.h:17:
/home/chethan/llvm-3.0/include/llvm/Support/type_traits.h:20:10: fatal error: 'utility' file not found
#include <utility>
^
1 error generated.
make[1]: *** [/home/chethan/llvm-3.0/lib/Support/Release/APFloat.o] Error 1
make[1]: Leaving directory `/home/chethan/llvm-3.0/lib/Support'
make: *** [all] Error 1
I follow these steps to build llvm on my machine.
Get the llvm source zip file from llvm download page and unzipped to folder llvm-3.0
cd /home/chethan/llvm-3.0
./configure
make -k
Although in this case, I just gave 'make' so that it stops on first error. I have llvm-gcc 4.2 installed on my machine.
I followed the same steps today morning in my home machine, and llvm-3.0 built successfully! Any idea what might be missing here?
configure with CC=gcc CXX=g++. It looks like the configure script is finding a version of clang that isn't actually set up correctly to compile C++ code.