본문 바로가기
VisualStudio.C++.C#

Visual C++. 사용자 정의 매크로 만들기. Include Directories, Library Directories

by 리치굿맨 2020. 9. 15.

 

 

Property Manager 창 열기  

메뉴 : View -> Other Windows -> Property Manager 클릭 

 

 

 

  1. Open the Property Manager window. (On the menu bar, choose View > Property Manager or View > Other Windows > Property Manager.) Open the shortcut menu for a property sheet (its name ends in .user) and then choose Properties. The Property Pages dialog box for that property sheet opens.
  2. In the left pane of the dialog box, select User Macros. In the right pane, choose the Add Macro button to open the Add User Macro dialog box.
  3. In the dialog box, specify a name and value for the macro. Optionally, select the Set this macro as an environment variable in the build environment check box.

 

 

 

위의 예와 같이 사용자 정의 macro 추가해두면  프로젝트 설정에서 Include Directory 에 경로 기록시 $(CySDK_CPP_PATH) 를 기록한다. 

 

 

모든 프로젝트에서 공통 적용되는 Include Directory 설정법 

- 위 설정창의 User Macros 아래에 보이는 VC++Directory 의   Include Directories 에 경로 기록한 이후 생성되는 VC++ 모든 프로젝트에 공통 적용되므로 프로젝트마다 개별적으로 헤더파일 인클루트 경로 지정하지 않아도 되므로 매우 편리함. 

 

모든 프로젝트에서 공통 적용되는 Library Directory 설정법 

- 위 설정창의 User Macros 아래에 보이는 VC++Directory 의   Library Directories 에 경로 기록한 이후 생성되는 VC++ 모든 프로젝트에 공통 적용된다. 

Library Directory 지정  용도 :  아래 구문처럼 lib 파일 경로 지정할 때 베이스 경로 지정하는 용도.  

 

#pragma comment(lib,"CyS2_CyFinBotFile/x64/Release/CyS2LE1_CyFinBotFile.LIB" )

 

 

 

 

 

 

 

 

 

from : docs.microsoft.com/ko-kr/cpp/build/working-with-project-properties?view=vs-2019

 

Visual Studio에서 C++ 컴파일러 및 빌드 속성 설정

Visual Studio IDE를 사용하여 C++ 컴파일러 및 링커 옵션과 기타 빌드 설정을 변경합니다.

docs.microsoft.com

 

 

 

 


첫 등록 : 2020.09.15

최종 수정 : 

단축 주소 : https://igotit.tistory.com/2593

 


 

댓글0


.    
현물 |선물 인버스 |선물 USDT     현물 | 선물 USDT |봇제작툴/카피트레이딩     현물 |선물 인버스 |선물 USDT     .