Sublime Forum

Trouble pointing build-system file to header file (C++)

#1

I am using Sublime Text 3 as a compiler for my C++ scripts, but I cannot understand why the pointer indicated in the .sublime-build file.

Specifically, I am trying to use the armadillo package for c++. After downloading the tar.xz file, I copied the files to: C:\package\armadillo74002\include. However, when I run the very simple script:

#include <armadillo>

I am getting an error: fatal error: armadillo: No such file or directory.

My .sublime-build file is as follows:

{ "cmd": ["g++", "$file_name", "-o", "${file_base_name}.exe", "-I C:/package/armadillo74002/include/", "&&", "start", "cmd", "/c" , "$file_base_name"], "selector": "source.c", "working_dir": "${file_path}", "shell": true }

I am wondering if the syntax of pointing to the folder is incorrect ("-I", where ā€œIā€ is a capital " i "), or if I am missing something bigger?

0 Likes