I downloaded the latest version of Cocos2dx (v3.4). I previously wrote a wrapper for Sqlite and I want to use that in my new project. But When I add the files, which are in a different directory than the project directory, I cannot include sqlite3.h in EasySqlite.h file. Compiler gives C:\Users\**\Desktop\**Project\Utilities\Backend\EasySqlite.h:3: error: C1083: Cannot open include file: 'sqlite3.h': No such file or directory
Here's part of my CMakeLists.txt file:
set(UTILITIES_SRC
../../Utilities/Backend/CommonVariables.cpp
../../Utilities/Backend/EasySqlite.cpp
../../Utilities/Backend/GameRecordManager.cpp
../../Utilities/Backend/ResourcesDatabaseManager.cpp
../../Utilities/Backend/Statistics.cpp
../../Utilities/Backend/StudentManager.cpp
../../Utilities/Backend/Toolbox.cpp
)
set(UTILITIES_HEADERS
../../Utilities/Backend/CommonVariables.h
../../Utilities/Backend/EasySqlite.h
../../Utilities/Backend/GameRecordManager.h
../../Utilities/Backend/ResourcesDatabaseManager.h
../../Utilities/Backend/Statistics.h
../../Utilities/Backend/StudentManager.h
../../Utilities/Backend/Toolbox.h
)
set(GAME_SRC
Classes/AppDelegate.cpp
Classes/TitleScreen.cpp
Classes/SplashScreen.cpp
Classes/Cocos2dxUtils.cpp
${PLATFORM_SPECIFIC_SRC}
${UTILITIES_SRC}
)
set(GAME_HEADERS
Classes/AppDelegate.h
Classes/TitleScreen.h
Classes/SplashScreen.h
Classes/Cocos2dxUtils.h
${PLATFORM_SPECIFIC_HEADERS}
${UTILITIES_HEADERS}
)
if(GAME_HEADERS)
add_executable(${APP_NAME} ${GAME_SRC} ${GAME_HEADERS})
else()
add_executable(${APP_NAME} ${GAME_SRC})
endif()
When I give the full path to the sqlite3.h file like #include "C:\Users\..\..\sqlite3.h"
I get linker errors.
EasySqlite.cpp.obj:-1: error: LNK2019: unresolved external symbol _sqlite3_close referenced in function "public: struct std::pair<struct sqlite3 *,int> __thiscall EasySqlite::openDatabase(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?openDatabase@EasySqlite@@QAE?AU?$pair@PAUsqlite3@@H@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@_N@Z)
When I move the mentioned files above and move them to the Classes directory in the cocos2dx project, even though I ca include sqlite3.h file in, say, AppDelegate.h file I still cannot include it in EasySqlite.h
Is'nt sqlite supposed to be linked with Cocos2dx already?