ホーム » gcc » VC Linux の include 設定

2019年10月
 12345
6789101112
13141516171819
20212223242526
2728293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,345 アクセス



VC Linux の include 設定

VC Linux プロジェクトの include 設定
次のようなコードをビルドするのに include の設定がわからなかった.

#include	<cstdio>
#include	"gettickc.hxx"

int main()
{
	printf("VC 2019 hello !\n");
	for (long index = 0; index < 100; index++) {
		::Sleep_ms(100);
		printf("hello \t");
		fflush(stdout);
		if (index%5 == 4)	{
			printf("\n");
			}
		}
	printf("VC 2019 hello !\n");
	return 0;
	}

VC Linux プロジェクトの 「インクルードディレクトリ」設定


MFC のプロジェクトなどであれば,次の所で指定している.
C:\Users\Iwao\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.x64.user.props
共通のインクルードディレクトリは,次の様なもの.
\\DevS\Documents\Develop\_.SRC\__CPR_;\\DevS\Documents\Develop\_.SRC\__Iwao;…


ソース内で次の様に指定してもエラーに.
#include “\\DevS\Documents\Develop\_.SRC\__CPR_\i_define.hxx”

1>main.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(412,5): error : g++ がコード 1 で終了しました。詳細については、出力ウィンドウでビルド出力をご確認ください (注: 出力ウィンドウで詳細を確認するには、ツール オプションでビルド出力の詳細度を変更する必要があります)。
1>プロジェクト "ConsoleApplication2.vcxproj" のビルドが終了しました -- 失敗。

他に #include “//devs/documents/develop/_.src/__cpr_/i_define.hxx” としてみたが変わらず.


Raspberry Pi でビルドするともう少しわかりやすいエラーの表示になった.

1>main.cpp
1>D:\Document\VS\VS\2019\T_Linux\ConsoleApplication2\main.cpp(18,10): error : \\DevS\Documents\Develop\_.SRC\__CPR_\i_define.hxx: そのようなファイルやディレクトリはありません
1>D:\Document\VS\VS\2019\T_Linux\ConsoleApplication2\main.cpp(18,10): error :  #include "\\DevS\Documents\Develop\_.SRC\__CPR_\i_define.hxx"
1>D:\Document\VS\VS\2019\T_Linux\ConsoleApplication2\main.cpp(18,10): error :           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>D:\Document\VS\VS\2019\T_Linux\ConsoleApplication2\main.cpp(18,10): error : compilation terminated.
1>プロジェクト "ConsoleApplication2.vcxproj" のビルドが終了しました -- 失敗。

いろいろやって,次の様に指定することでうまくいった.
#include “/mnt/_.src/__cpr_/i_define.hxx”
プロジェクトの設定で次のものを指定することでビルドできることを確認.
/mnt/_.src/__CPR_;/mnt/_.src/__Iwao;/mnt/_.src/__Mlt_;/mnt/_.src/_gcc;/mnt/_.src/Test


/mnt/_.src はマウントしている.
Linux から Windows 環境への接続
g++ インクルードパスの設定

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

1件のコメント

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

%d人のブロガーが「いいね」をつけました。