프로그래밍 언어2018. 6. 18. 08:51
* Adds include and library path to the all projects by default
Open and edit the file %UserProfile%/AppData/Local/Microsoft/MSBuild/v4.0/Microsoft.Cpp.x64.user.props and add the red lines in the following (Also needs to refer to https://github.com/qPCR4vir/nana-docs/wiki/Installation)

<?xml version="1.0" encoding="utf-8"?>

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets">
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <IncludePath>C:\nana\include;$(IncludePath)</IncludePath>
    <LibraryPath>C:\nana\extrlib\vc2017;C:\nana\build\bin\vc2017;$(LibraryPath)</LibraryPath>
  </PropertyGroup>
  <ItemDefinitionGroup />
  <ItemGroup />
</Project>



* Changes the options to use static libraries
Open the project property page and change the options as follows for the property, C/C++ > Code Generation > Runtime Library.


Multi-threaded Debug (/MTd) for the Debug Configuration

Multi-threaded (/MT) for the Release Configuration



* (Optional) Adds the 3rd party libraries to make linker working properly

(Do this if you decide to use the 3rd party libraries. Refer to https://github.com/cnjinhao/nana/wiki/Configuration-of-Third-Party-Libraries-for-Nana)

Open the project property page and add the following line to the property, Linker > Input > Additional Dependeicies.

nana_$(DefaultPlatformToolset)_$(Configuration)_$(PlatformTarget).lib;libjpeg.MT.$(PlatformTarget).lib;libpng.MT.$(PlatformTarget).lib;libzlib.MT.$(PlatformTarget).lib;



* (Optional) Gets rid of the console window

  1. Open the project property page.
  2. Change the options as follows for the property, Linker > System > SubSystem.
    Windows (/SUBSYSTEM:WINDOWS)
  3. Add the following keyword to the property, Linker > Advanced > Entry Point.
    mainCRTStartup


Posted by 세월의돌