質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
include

あるファイルで定義された関数や処理を、別のファイル上でも使用できるようにするプロセスをincludeと呼びます。

C++

C++はC言語をもとにしてつくられた最もよく使われるマルチパラダイムプログラミング言語の1つです。オブジェクト指向、ジェネリック、命令型など広く対応しており、多目的に使用されています。

Q&A

1回答

493閲覧

VSCodeのインクルードパス

Petro

総合スコア12

include

あるファイルで定義された関数や処理を、別のファイル上でも使用できるようにするプロセスをincludeと呼びます。

C++

C++はC言語をもとにしてつくられた最もよく使われるマルチパラダイムプログラミング言語の1つです。オブジェクト指向、ジェネリック、命令型など広く対応しており、多目的に使用されています。

0グッド

0クリップ

投稿2019/04/22 07:25

Thank you always for all your support.
I would like to compile pangolin with Visual Studio Code on Ubuntu.
Now the sample code has
#include <pangolin/pangolin.h>
and the following is the error:
main.cpp:1:10: fatal error: pangolin/pangolin.h: No such file or directory
#include <pangolin/pangolin.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Incidentally, make build seems to have been successfully done.
An example executable file in the build folder works.

What I have been doing for solving this problem is that
I modified the c_cpp_properties.json file as it passes
"Pangolin/include" to the "includePath".

Thank you for advance.

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

投稿2019/04/23 00:22

MasahikoHirata

総合スコア3747

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

Petro

2019/04/23 01:41

Thank you, Mr. MasahikoHirata, Actually, I have also found that HP and I modified a part of the c_cpp_properties.json file as "includePath":[ "${workspaceFolder}/**", "Pangolin/include" ] The directory structure is "Pangolin/include/pangolin/pangolin.h". The compiler still complains the same. I also tried with exporting the path embedded in the bashrc file, but it didn't work. Thank you.
MasahikoHirata

2019/04/23 01:52

MR Petro. I think directory sttucture was bad. Did you decreare 'Pandolin'?in environ? Your PC can't find this path,I think.
Petro

2019/04/23 02:09

Thank you, Your suggestion seems to tell the problem. My directory structure is /home/user-name/Pangolin/... Occasionally, the following command seems to pass the compiler g++ main.cpp -I../../include -I../../build/src/include but with a lot of errors of the other kind. My writing manner of includePath must be incorrect, but I cannot find the appropriate way that resolve this issue. Thank you.
Petro

2019/04/23 08:17

Thank you very much. I did write like that. I am trying the other ways...
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問