When I compile c++ file using g++ command as below, the fatal error: numpy/arrayobject.h: No such file or directory occurred.
>g++ filename.cpp -std=c++11 -IC:\Python27\include -lpython2.7
In file included from filename.cpp:1:
../libs/matplotlibcpp.h:17:12: fatal error: numpy/arrayobject.h: No such file or directory
17 | # include <numpy/arrayobject.h>
matplotlibcpp.h in the source code is c++ header file to plot a graph.
numpy/arrayobject.h is in the directory C:\Python27\Lib\site-packages\numpy\core\include\numpy.
Cause
The compiler could not find arrayobject.h because that file is not included in the include search path.
Solution
Add the path to arrayobject.h using -I command line option as follows.
“MathJax-LaTeX” is the plugin for rendering of embedded LaTeX or MathML in HTML pages. It convert LaTeX style code ” \int^{ \infty}_{a} f(x) dx = \lim_{n \to \infty} \int^{n}_{a} f(x) dx” into the formula as below. $$\int^{ \infty}_{a} f(x) dx = \lim_{n \to \infty} \int^{n}_{a} f(x) dx$$
Input shortcode
Input shortcode “mathjax” on your post. (Input mathjax with [ and ])
Input formula
Input LaTex style code of the formula enclosed in $$s.
Trouble shooting
If the shortcode “mathjax” doesn’t work well, open “Plugins” panel and click the setting of “MathJax-LaTeX” on your Dashboard. Check the “Force Load”.
An error “Permission denied @ apply2files – /usr/local/share/ghostscript/9.23/Resource/CIDFSubst/Deng.ttf” occurred when I tried to update homebrew.
What is homebrew?
Homebrew is a package management system to install and update software for macOS. (Official link: https://brew.sh/index_en)
What is ghostscript?
Homebrew is a package management system to install and update software for macOS. (Official link: https://brew.sh/index_en) Ghostscript is invoked and started by other software including homebrew.
The Resource / CIDFSubst directory is a directory to store TrueType fonts (but there is no problem here).
Cause of the error
Because the error message says “Permission denied”, the current user does not have access. So it seems that homebrew cannot use the required files.
Solution
As an immediate solution, give access to the ghostscript directory with the following command. You will be prompted for a password.