2016-03-23 3 views
1

Hallo Ich muss ein Qt Projekt mit openmp kompilieren (gebaut mit cmake).Homebrew Liste der verfügbaren Compiler

Bis jetzt habe ich gcc-5 von homebrew zur Verfügung gestellt, aber ich mag Klappern verwenden (meinen Geschmack ...)

Ich installierte clang-omp über homebrew install clang-omp aber jetzt, wenn ich versuche, mein Projekt zu kompilieren (erzeugt über cmake -DCMAKE_CXX_COMPILER=/usr/local/bin/clang-omp++ ..) , bekomme ich diesen Fehler:

cd /Users/tommaso/neutrino/debug/src && /usr/local/bin/clang-omp++ -DHAVE_HDF5 -DHAVE_JPEG -DHAVE_LIBCFITSIO -DHAVE_LIBCLFFT -DHAVE_LIBDF -DHAVE_LIBFFTW -DHAVE_LIBFFTW_THREADS -DHAVE_LIBGSL -DHAVE_LIBGSLCBLAS -DHAVE_LIBHDF5HL -DHAVE_LIBMFHDF -DHAVE_LIBNETPBM -DHAVE_LIBTIFF -DHAVE_NPHYSIMAGE -DHAVE_OPENCL -DHAVE_PYTHONQT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_PRINTSUPPORT_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_UIPLUGIN_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DUSE_QT5 -D__VER=\"osx-cmake-v2.0-75.bdff6e3\" -I/Users/tommaso/neutrino/debug/src -I/Users/tommaso/neutrino/src -I/usr/include/hdf -I/usr/local/include/netpbm -I/Library/Frameworks/qwt.framework/Headers -I/usr/local/Cellar/hdf5/1.8.16_1/include -I/usr/include/python2.7 -I/Users/tommaso/neutrino/src/../../pythonqt-code/src -I/Users/tommaso/neutrino/src/../../pythonqt-code/src/gui -I/Users/tommaso/pythonqt-code/src -I/Users/tommaso/pythonqt-code/extensions/PythonQt_QtAll -I/Users/tommaso/neutrino/src/python -iframework /usr/local/opt/qt5/lib -isystem /usr/local/opt/qt5/lib/QtCore.framework/Headers -isystem /usr/local/opt/qt5/./mkspecs/macx-clang -isystem /usr/local/opt/qt5/lib/QtGui.framework/Headers -isystem /System/Library/Frameworks/OpenGL.framework/Headers -isystem /usr/local/opt/qt5/lib/QtSql.framework/Headers -isystem /usr/local/opt/qt5/lib/QtWidgets.framework/Headers -isystem /usr/local/opt/qt5/lib/QtSvg.framework/Headers -isystem /usr/local/opt/qt5/lib/QtPrintSupport.framework/Headers -isystem /usr/local/opt/qt5/include -isystem /usr/local/opt/qt5/include/QtUiTools -isystem /usr/local/opt/qt5/lib/QtMultimedia.framework/Headers -isystem /usr/local/opt/qt5/lib/QtNetwork.framework/Headers -isystem /usr/local/opt/qt5/lib/QtMultimediaWidgets.framework/Headers -I/Users/tommaso/neutrino/debug -I/Users/tommaso/neutrino/src/graphics -I/Users/tommaso/neutrino/src/doc -I/Users/tommaso/neutrino/src/pans -I/Users/tommaso/neutrino/src/pans/VISAR -I/Users/tommaso/neutrino/src/pans/colorbar -I/Users/tommaso/neutrino/src/pans/winlist -I/Users/tommaso/neutrino/src/../nPhysImage -I/Users/tommaso/neutrino/nPhysImage -isystem /usr/local/opt/qt5/lib/QtUiPlugin.framework/Headers -O3 -fopenmp -fopenmp -O0 -ggdb -D__phys_debug=10 -std=c++11 -Wall -fPIC -mmacosx-version-min=10.6 -o CMakeFiles/Neutrino.dir/neutrino.cc.o -c /Users/tommaso/neutrino/src/neutrino.cc 

In file included from /Users/tommaso/neutrino/src/neutrino.cc:26: 
In file included from /usr/local/opt/qt5/lib/QtSvg.framework/Headers/QtSvg:3: 
In file included from /usr/local/opt/qt5/include/QtSvg/QtSvgDepends:3: 
In file included from /usr/local/opt/qt5/include/QtCore/QtCore:4: 
In file included from /usr/local/opt/qt5/lib/QtCore.framework/Headers/qabstractanimation.h:37: 
In file included from /usr/local/opt/qt5/include/QtCore/qobject.h:41: 
/usr/local/opt/qt5/include/QtCore/qstring.h:739:55: error: no type named 'u16string' in namespace 'std' 
    static inline QString fromStdU16String(const std::u16string &s); 

Es stellt sich heraus (korrigiert mich wenn ich falsch liege), die ich brauche wahrscheinlich qt mit dem gleichen clang-omp Compiler zu kompilieren.

dachte ich keine große Sache aber homebrew schreit, wenn ich das versuchen:

HOMEBREW_CC=clang-omp HOMEBREW_CXX=clang-omp++ brew install -s qt5 
Error: Invalid value for HOMEBREW_CC: clang-omp 

So ist es eine Möglichkeit, Qt neu aufgebaut haben homebrew mit?

Gibt es einen Befehl, um die verfügbaren Compiler für homebrew zu erhalten?

Antwort

1

Das erneute Kompilieren von Qt mit einem anderen Compiler wird das Problem wahrscheinlich nicht lösen.

Werfen Sie einen Blick auf this other question statt ...

Es ist auch ein Fehler in Qt-Header sein kann, die nicht der Compiler richtig erkennen kann, und dann nimmt fälschlicherweise es Unterstützung für std::u16string

hat oder vielleicht haben Sie vergaß einfach hinzuzufügen #include <string>

+0

vielen dank! Du hast beide Probleme gepinnt! – bibi