none
VS 2017/2019 doesn't find icu lib with SDK 10, but does with sdk 8.1 RRS feed

  • Question

  • We have a Project which uses ICU.

    From there we Need icuin.lib and icuuc.lib.

    If SDK 8.1 is used then the libs are found, but not if a SDK 10 is used.

    So I advised VS to give out the search path for the libs.

    SDK 8.1:

    Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\secur32.lib:
    Searching D:\Arbeit64\Projekte\LIB2010\lib\32\icuin.lib:
    Searching D:\Arbeit64\Projekte\LIB2010\lib\32\icuuc.lib:
    Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ws2_32.lib:
    Searching D:\arbeit64\Projekte\palo_ala_vlado\palo_engine3_tk142\..\..\lib2010\lib\32\v142\ssleay32MT.lib:
    Searching D:\arbeit64\Projekte\palo_ala_vlado\palo_engine3_tk142\..\..\lib2010\lib\32\v142\libeay32MT.lib:
    <standard libs>
    Searching D:\Arbeit64\Projekte\LIB2010\lib\32\libboost_thread-vc142-mt-x32-1_71.lib:

    SDK 10:

    Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x86\secur32.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x86\icuin.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x86\icuuc.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x86\ws2_32.lib:
    Searching D:\arbeit64\Projekte\palo_ala_vlado\palo_engine3_tk142\..\..\lib2010\lib\32\v142\ssleay32MT.lib:
    Searching D:\arbeit64\Projekte\palo_ala_vlado\palo_engine3_tk142\..\..\lib2010\lib\32\v142\libeay32MT.lib:
    <standard libs>
    Searching D:\Arbeit64\Projekte\LIB2010\lib\32\libboost_thread-vc142-mt-x32-1_71.lib:

    This is for a 32bit build.

    In
    <userdir>\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props
    I have

    <?xml version="1.0" encoding="utf-8"?>
    <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <PropertyGroup>
        <ExecutablePath>$(VSInstallDir)\SDK\v2.0\bin;$(ExecutablePath)</ExecutablePath>
        <IncludePath>$(IncludePath);D:\Arbeit64\Projekte\LIB2010\include;D:\Arbeit64\Source\PHP\PHPSOURCE;D:\Arbeit64\Source\PHP\PHPSOURCE\main;D:\Arbeit64\Source\PHP\PHPSOURCE\win32;D:\Arbeit64\Source\PHP\PHPSOURCE\Zend;D:\Arbeit64\Source\PHP\PHPSOURCE\TSRM</IncludePath>
        <ReferencePath>$(ReferencePath)</ReferencePath>
        <LibraryPath>$(LibraryPath);D:\Arbeit64\Projekte\LIB2010\lib\32;D:\Arbeit64\Projekte\LIB2010\lib</LibraryPath>
        <SourcePath>$(SourcePath)</SourcePath>
        <ExcludePath>$(ExcludePath)</ExcludePath>
      </PropertyGroup>
    </Project>

    Why doesn't looek VS in D:\Arbeit64\Projekte\LIB2010\lib\32 anymore for the icu libs if SDK 10 is used ?

    tia

      Hendrik Schmieder

    Friday, January 31, 2020 11:23 AM

Answers

  • Because a subset of ICU was made part of the Window SDK and Windows. Look at the path it is getting the ICU libraries from, this should tell you everything.

    So technically it is finding the ICU libraries, just not where you expect it to find them. The three highlighted libraries are the ICU libraries in the Windows 10 SDK. If you look in System32/SysWow64 you should find that the DLLs for these also exist.

    If you want to get it to use the version from the ICU package, you must put the ICU directory before the Windows SDK directory in the library paths. This will get the linker to search for the ICU directory before the Windows SDK directory:

    D:\Arbeit64\Projekte\LIB2010\lib\32;D:\Arbeit64\Projekte\LIB2010\lib;$(LibraryPath)


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    • Edited by Darran Rowe Friday, January 31, 2020 11:46 AM
    • Marked as answer by h_schmieder Friday, January 31, 2020 1:02 PM
    Friday, January 31, 2020 11:45 AM

All replies

  • Because a subset of ICU was made part of the Window SDK and Windows. Look at the path it is getting the ICU libraries from, this should tell you everything.

    So technically it is finding the ICU libraries, just not where you expect it to find them. The three highlighted libraries are the ICU libraries in the Windows 10 SDK. If you look in System32/SysWow64 you should find that the DLLs for these also exist.

    If you want to get it to use the version from the ICU package, you must put the ICU directory before the Windows SDK directory in the library paths. This will get the linker to search for the ICU directory before the Windows SDK directory:

    D:\Arbeit64\Projekte\LIB2010\lib\32;D:\Arbeit64\Projekte\LIB2010\lib;$(LibraryPath)


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    • Edited by Darran Rowe Friday, January 31, 2020 11:46 AM
    • Marked as answer by h_schmieder Friday, January 31, 2020 1:02 PM
    Friday, January 31, 2020 11:45 AM
  • Thanks for the answer.

    This solved my Problem.

    I also changed the entry for <IncludePath>.

    It is now

    <IncludePath>D:\Arbeit64\Projekte\LIB2010\include;$(IncludePath);...</IncludePath>

    Moved

    D:\Arbeit64\Projekte\LIB2010\include;

    before

    $(IncludePath);

    Friday, January 31, 2020 1:02 PM