Linux Can't resolve namespace member 'srand', but compiles fine

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: Feel free to follow to get the updates.


Please sign in to leave a comment.