---
title: "C++ DLL の操作 (MS Visual Studio との統合) - プログラムの開発 - MetaEditorのヘルプ"
description: "MQL4/MQL5でトレーディングプログラムを開発する場合、サードパーティの C++ dll を使用できます。 C++ソースコードファイル (CPP および H) は、MQ4、MQ5、MQH と同様に編集することができます。 DLL... - C++ DLL の操作 (MS Visual Studio との統合) - プログラムの開発 - MetaEditorのヘルプ"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
---

[MetaEditorのヘルプ](https://www.metatrader5.com/ja/metaeditor/help) → [プログラムの開発](https://www.metatrader5.com/ja/metaeditor/help/development) → C++ DLL の操作 (MS Visual Studio との統合)

# C++ DLL の操作 (MS Visual Studio との統合)

MQL4/MQL5でトレーディングプログラムを開発する場合、サードパーティの C++ dll を使用できます。 C++ソースコードファイル (CPP および H) は、MQ4、MQ5、MQH と同様に編集することができます。 DLL 内のファイルは、エディタから直接コンパイルすることもできます。 ユーザーの PC にインストールされている Microsoft Visual Studio も使用することができます。 コンパイルするには、C++ ファイルを開き、F7 キー (コンパイルコマンド) を押します。

![C++ での DLL の操作](https://www.metatrader5.com/i/help/metaeditor/en/compile_dll.png)

| ユーザーの PC にインストールされている MS Visual Studio コンパイラは、C++ ソースコードのコンパイルに使用されます。 MS Visual Studio 2008 以降 (Express およびコミュニティバージョンを含む) がサポートされています。コンパイラパスを手動で指定するには、[設定セクション](https://www.metatrader5.com/ja/metaeditor/help/beginning/settings#compiler)に移動します。MS Visual Studio バージョン (32 または64ビット) は、MetaEditorバージョンと一致する必要があります。 |
| --- |

MetaEditorは、エクスポートされた DLL 関数を MQL4/MQL5ファイルに追加する関数も提供します。 [[ナビゲータ](https://www.metatrader5.com/ja/metaeditor/help/workspace/navigator)] ウィンドウから、開いている MQ4、MQ5、または MQH ファイルにDLL ファイルをドラッグするだけです。

![DLL から関数をインポートする](https://www.metatrader5.com/i/help/metaeditor/en/dll_import.png)

```json
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {"@type": "ListItem", "position": 1, "item": {"@id": "/ja/metaeditor/help", "name": "MetaEditorのヘルプ"}}, {"@type": "ListItem", "position": 2, "item": {"@id": "/ja/metaeditor/help/development", "name": "プログラムの開発"}}, {"@type": "ListItem", "position": 3, "item": {"@id": "/ja/metaeditor/help/development/c_dll", "name": "C++ DLL の操作 (MS Visual Studio との統合)"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: C++ DLL の操作 (MS Visual Studio との統合)", "acceptedAnswer": { "@type": "Answer", "text": "MQL4/MQL5でトレーディングプログラムを開発する場合、サードパーティの C++ dll を使用できます。 C++ソースコードファイル (CPP および H) は、MQ4、MQ5、MQH と同様に編集することができます。 DLL 内のファイルは、エディタから直接コンパイルすることもできます..." } }] }
```
