编译mpic++;升级mac后不再工作 我有一个C++的构建脚本,看起来像:
mpic++main.cpp tools.cpp treeofdevil.cpp solver.cpp periodicfunction.cpp-o ising-lgurobi_c++-lgurobi60-lpthread-lm-Wall-m64-fPIE-feexceptions-fronting math-O2-I/Library/gurobi604/mac64/include/-I/usr/local/include/-I-L/Library/gurobi604/mac64/lib/-L/usr/local/lib/-lboost\u regex-lboost\u系统-lboost\mpi-lboost_序列化 在我从OSX 10.9 Maverick->OSX El Capitan升级mac之前,mac OSX 10.9中的一切都很好。。。。然而,升级后,当我尝试以同样的方式编译时。。我得到了错误编译mpic++;升级mac后不再工作 我有一个C++的构建脚本,看起来像:,c++,macos,C++,Macos,mpic++main.cpp tools.cpp treeofdevil.cpp solver.cpp periodicfunction.cpp-o ising-lgurobi_c++-lgurobi60-lpthread-lm-Wall-m64-fPIE-feexceptions-fronting math-O2-I/Library/gurobi604/mac64/include/-I/usr/local/include/-I-L/Library/gurobi604/mac64/lib/-L/
In file included from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/bits/postypes.h:40:0,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iosfwd:40,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iomanip:39,
from common.h:13,
from main.cpp:13:
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cwchar:44:19: fatal error: wchar.h: No such file or directory
#include <wchar.h>
^
compilation terminated.
In file included from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/bits/postypes.h:40:0,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iosfwd:40,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/ios:38,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/ostream:38,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iostream:39,
from tools.h:13,
from tools.cpp:1:
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cwchar:44:19: fatal error: wchar.h: No such file or directory
#include <wchar.h>
^
compilation terminated.
In file included from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/bits/postypes.h:40:0,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iosfwd:40,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/ios:38,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/ostream:38,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iostream:39,
from treeofdevil.h:13,
from treeofdevil.cpp:1:
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cwchar:44:19: fatal error: wchar.h: No such file or directory
#include <wchar.h>
^
compilation terminated.
In file included from solver.cpp:1:0:
solver.h:16:20: fatal error: unistd.h: No such file or directory
#include <unistd.h>
^
compilation terminated.
In file included from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/bits/postypes.h:40:0,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iosfwd:40,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/ios:38,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/ostream:38,
from /usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/iostream:39,
from periodicfunction.h:13,
from periodicfunction.cpp:1:
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cwchar:44:19: fatal error: wchar.h: No such file or directory
#include <wchar.h>
^
修复你的编译器。它通常在操作系统版本升级后损坏 此命令应有助于:
brew update
brew doctor
brew upgrade
此外,要使brew在El Capitan上运行,您可能需要重置/usr/本地所有者并禁用系统完整性保护
csrutil disable
查看以下答案:谢谢。。。。然而,我仍然有一些问题。。。你知道我能做什么吗?谢谢。请再次尝试运行brew doctor
,并执行它要求的任何操作
:19086:suffix or operands invalid for `movq'
:5054:suffix or operands invalid for `movq'
:5059:suffix or operands invalid for `movq'
:5959:suffix or operands invalid for `movq'
:6196:suffix or operands invalid for `movq'
brew update
brew doctor
brew upgrade