LoginSignup
0
0

More than 5 years have passed since last update.

Visual Studio 2015 > #pragma comment(lib, "myAPI.lib") > プロジェクト設定でなく、コードでDLLインポートを指定する

Last updated at Posted at 2015-09-22
動作確認
Visual Studio 2015 Community Edition

myAPI.dllを読み込む設定をプロジェクトの設定で探したが見つからなかった。
色々調べた結果、.hファイルに以下の行があり、それでdllの関連付けができていることが分かった。

myAPI.h
#pragma comment(lib, "myAPI.lib")

SOなどを見るとバージョン違いのdllを切り替えて使うなど便利そうだということらしい。

#ifdef USE_FIRST_VERSION
#pragma comment(lib, "vers1.lib")
#else
#pragma comment(lib, "vers2.lib")
#endif
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0