Linking Crypt() Library?

已回答

Hi,

I've installed "msys-libcrypt" via MinGW installer. Below is my "CMakeLists.txt" file. When i try to build & run, i get this error. 

fatal error: crypt.h: No such file or directory

Any ideas? Thanks.

cmake_minimum_required(VERSION 3.6)
project(CS50)

set(CMAKE_CXX_STANDARD 11)

set(SOURCE_FILES main.cpp functions.cpp)
add_executable(CS50 ${SOURCE_FILES})
target_link_libraries(CS50 crypt)
0

You should either manually provide the path to its headers (e.g.`include_directories('path/to/crypt')` or use `find_package` for it.

0

请先登录再写评论。