Reputation: 61
I don't want to install sqlite globally in my system, so I have downloaded the sqlite3 files from https://www.sqlite.org/2018/sqlite-amalgamation-3240000.zip and have copied sqlite3.c
and sqlite3.h into the project folder.
CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(learn_cpp)
set(CMAKE_CXX_STANDARD 11)
add_executable(learn_cpp main.cpp)
main.cpp :
#include <iostream>
#include "sqlite3.h"
int main() {
return 0;
}
I am not getting any of the functions from sqlite3.h
as suggestion in the CLion IDE.
Upvotes: 0
Views: 431
Reputation: 66061
By default, CMake doesn't search headers files in the current directory. For enable this behaviour, set CMAKE_INCLUDE_CURRENT_DIR variable:
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(learn_cpp main.cpp ...)
Upvotes: 2