macports からダウンロードした g++-mp-4.8 で sleep() などの標準コマンドを実行すると、深刻な問題が発生します。llvm-g++-4.2 でコンパイルしてもこれらの問題はありません。
このプログラムで C++11 の機能を使用しようとしているので、これは非常に面倒です。
コンパイラからの読み取りは次のとおりです。長すぎて申し訳ありません。どうすればよいかわかりません。
17:11:54 **** Incremental Build of configuration Debug for project BSDESimV2 ****
make all
Building file: ../TrueSolutions/TrueSoln.cpp
Invoking: GCC C++ Compiler
/opt/local/bin/g++ -g -O0 -Wall -I/opt/local/include -I/usr/include -I/usr/llvm-gcc-4.2 /lib/gcc/i686-apple-darwin11/4.2.1/include -I/Applications/Xcode.app/Contents/Developer/usr/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include -I/usr/include/c++/4.2.1 -I/usr/include/c++/4.2.1/backup -I/opt/local/bin -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"TrueSolutions/TrueSoln.d" -MT"TrueSolutions/TrueSoln.d" -o "TrueSolutions/TrueSoln.o" "../TrueSolutions/TrueSoln.cpp"
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:72:0,
from /usr/include/c++/4.2.1/bits/char_traits.h:46,
from /usr/include/c++/4.2.1/ios:45,
from /usr/include/c++/4.2.1/istream:44,
from /usr/include/c++/4.2.1/fstream:45,
from ../TrueSolutions/TrueSoln.h:15,
from ../TrueSolutions/TrueSoln.cpp:8:
/usr/include/c++/4.2.1/bits/cpp_type_traits.h:381:12: error: expected identifier before '__is_pod'
struct __is_pod
^
/usr/include/c++/4.2.1/bits/cpp_type_traits.h:381:12: error: expected unqualified-id before '__is_pod'
/usr/include/c++/4.2.1/bits/cpp_type_traits.h:394:12: error: expected identifier before '__is_empty'
struct __is_empty
^
/usr/include/c++/4.2.1/bits/cpp_type_traits.h:394:12: error: expected unqualified-id before '__is_empty'
In file included from /usr/include/c++/4.2.1/memory:54:0,
from /usr/include/c++/4.2.1/string:48,
from /usr/include/c++/4.2.1/bits/locale_classes.h:47,
from /usr/include/c++/4.2.1/bits/ios_base.h:47,
from /usr/include/c++/4.2.1/ios:48,
from /usr/include/c++/4.2.1/istream:44,
from /usr/include/c++/4.2.1/fstream:45,
from ../TrueSolutions/TrueSoln.h:15,
from ../TrueSolutions/TrueSoln.cpp:8:
/usr/include/c++/4.2.1/bits/allocator.h:135:41: error: expected unqualified-id before '__is_empty'
template<typename _Alloc, bool = std::__is_empty<_Alloc>::__value>
^
/usr/include/c++/4.2.1/bits/allocator.h:135:41: error: expected '>' before '__is_empty'
In file included from /usr/include/c++/4.2.1/vector:70:0,
from ../TrueSolutions/TrueSoln.h:23,
from ../TrueSolutions/TrueSoln.cpp:8:
/usr/include/c++/4.2.1/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::swap(std::vector<_Tp, _Alloc>&)':
/usr/include/c++/4.2.1/bits/stl_vector.h:740:34: error: template argument 2 is invalid
std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
^
/usr/include/c++/4.2.1/bits/stl_vector.h:740:45: error: invalid type in declaration before '(' token
std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
^
/usr/include/c++/4.2.1/bits/stl_vector.h:741:36: error: expression list treated as compound expression in initializer [-fpermissive]
__x._M_get_Tp_allocator());
^
In file included from /usr/include/c++/4.2.1/vector:71:0,
from ../TrueSolutions/TrueSoln.h:23,
from ../TrueSolutions/TrueSoln.cpp:8:
/usr/include/c++/4.2.1/bits/stl_bvector.h: In member function 'void std::vector<bool, _Alloc>::swap(std::vector<bool, _Alloc>&)':
/usr/include/c++/4.2.1/bits/stl_bvector.h:690:56: error: template argument 2 is invalid
std::__alloc_swap<typename _Base::_Bit_alloc_type>::
^
/usr/include/c++/4.2.1/bits/stl_bvector.h:691:10: error: invalid type in declaration before '(' token
_S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator());
^
/usr/include/c++/4.2.1/bits/stl_bvector.h:691:61: error: expression list treated as compound expression in initializer [-fpermissive]
_S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator());
^
make: *** [TrueSolutions/TrueSoln.o] Error 1