Linux Can't resolve namespace member 'srand', but compiles fine Permanently deleted user 创建于 2016年07月30日 11:07 Linux desktop 4.6.4-1-ARCH #1 SMP PREEMPT Mon Jul 11 19:12:32 CEST 2016 x86_64 GNU/Linux g++ (GCC) 6.1.1 20160707 I've included <stdlib.h>. This code compiles fine.
It appears that CLion doesn't support GCC 6.1 series, if not 6.xx. If you set CC=gcc-5 and CXX=g++-5 things will work correctly in the IDE.
You are right - it's not supported currently because of some problems listed as subtickets here: https://youtrack.jetbrains.com/issue/CPP-6883. Feel free to follow to get the updates.