Setup for SQLite3 in Unreal Engine with C++
Build settings
Open the file <MyGame>.Build.cs and add the SQLitePro module as a dependency.
using UnrealBuildTool;
public class MyGame : ModuleRules
{
public MyGame(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
// The rest of the file...
// ADD THIS LINE:
PublicDependencyModuleNames.AddRange(new string[] { "SQLitePro" });
}
}Once added, we need to regenerate the project files to get the includes working with your IDE:
- Navigate to the root of your UE project.
- Right-click on the
<MyGame>.uprojectfile. - Select
Generate <IDE> project files.
Includes
The plugin is packaged with a single header file:
#include "SQLitePro.h"Going further
Checkout the getting started page for C++ examples.