undefined reference to xxx solutions appear cmake

cmake not how to use, mainly Clion feel very good, but the default clion using cmake. And again clion linux platform is very easy to use, personal strong push.

When you use clion time, if a thread cstl such as library time will be undefined reference to xxx and other issues.

Solution:

 

The last line is added TARGET_LINK_LIBRARIES in cmake () to rely on third-party libraries put here on it.

 

Guess you like

Origin www.cnblogs.com/oldBook/p/11884212.html