Closed bug-fixed closed 9 years ago
Recently I've compiled
curfil
in CentOS 6.5, but in the system, there is onlygcc 4.4.7
installed. The gcc has no support withc++0x
, and it will report an error when compilingcurfil
. Could you give me some advice on how to compile this library withgcc 4.4.7
in CentOS 6.5, please?
Not sure which c++0x features are used, maybe you can simply try to remove the flag and see which problems occur. They should all be syntactical in nature, so you'll find them using your compiler alone. You'll likely have to fix range-based for-loops [1] or auto variables [2]. The flag you need to remove is specified in the CMakeLists.txt file. It might be easier if you just install a more modern C++ compiler on your system [3].
[1] http://www.cprogramming.com/c++11/c++11-ranged-for-loop.html [2] http://en.cppreference.com/w/cpp/language/auto [3] http://unix.stackexchange.com/questions/63587/how-to-install-g-4-7-2-c11-on-centos-5-x
@temporaer , thank you very much for comments and suggestions!
I have compiled the GCC 4.6.3
and then compiled the curfil
, the errors were gone.
Yes, I have tried to modify those features in C++0x
into the regular usage. I found much auto
keywords in loop were used, but I didn't continue this.
The CUDA
needs a compatible GCC
, http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/#system-requirements, so I didn't use more latest GCC
because the GCC 4.6.3
has provided the enough feature of C++0x
.
The
CUDA
needs a compatibleGCC
, so I didn't use more latestGCC
because theGCC 4.6.3
has provided the enough feature ofC++0x
.
you can tell nvcc to use an older version of gcc to compile .cu-files, but use a more modern one for your own .cpp files. This can be done through cmake.
@temporaer , I thought this couldn't be done before, thank you for this experience! I would try that.
Hi, thank you for this great library!
Recently I've compiled
curfil
in CentOS 6.5, but in the system, there is onlygcc 4.4.7
installed. The gcc has no support withc++0x
, and it will report an error when compilingcurfil
. Could you give me some advice on how to compile this library withgcc 4.4.7
in CentOS 6.5, please? Thanks!