I solved this issue by doing the following steps:
Install Chocolatey package manager
Install emacs, sqlite, mingw and msys2 using chocolatey
choco install emacs sqlite msys2 mingw -y
- Open your configuration file or your
init.el file in your .emacs.d directory and copy paste the following code and save it. For more details, visit org-roam user manual
(use-package org-roam :ensure t)
Open emacs to force it to download the org-roam packages
Open msys2 and execute the following commands (These steps may not be necessary, however it is recommended based on the MSYS2 Website):
pacman -Syu
pacman -Su
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
- Open
msys2 and execute the following command:
pacman -S gcc
- While still inside
msys2, navigate to your downloaded emacs-sqlite package located in your .emacs.d. In my case, it is located here: C:\Users\User\AppData\Roaming\.emacs.d\elpa\emacsql-sqlite-20190727.1710\sqlite. Therefore, the command was:
cd C:/Users/User/AppData/Roaming/.emacs.d/elpa/emacsql-sqlite-20190727.1710/sqlite
if you're using Spacemacs, then sqlite will be in a different folder like:
C:/Users/User/AppData/Roaming/.emacs.d/elpa/27.2/develop/emacsql-sqlite-20190727.1710
- In your
emacsql-sqlite/sqlite directory, you should have these four files:
- emacsql.c
- Makefile
- sqlite3.c
- sqlite3.h
- While inside
emacsql-sqlite/sqlite directory, execute the following command:
make emacsql-sqlite CC=gcc LDLIBS=
Now you should have an additional file called emacsql-sqlite.exe.
Lastly, just restart your emacs and you are good to go.
Hope this help anybody in the future.