Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category.

Static Driver Verifier build issue

I'm having a quirky problem with running SDV on my project. I'm using VS2017 and the latest WDK.

The build phase complains about failing even though I can build everything just fine either through the IDE or using MSBuild directly. The error messages are fairly opaque but dialing up the debug and looking at some logs has shown me the cause but not the solution.

It seems like the link phase is building the output into an 'odd' directory. That is, I have a project folder of ebUniversalProForU3V which is where everything should take place. At some phase of the build, it winds up creating and using a ebUniversalProForU3Vx64 folder and putting the .sys, .inf, .pdb files in there.

From sniffing through the logs it looks like it then can't find its own output and gets confused. To me it looks like a '\' is getting dropped and it should be ebUniversalProForU3V\x64 but for the life of me I can't figure out where it's happening. I've been mucking around with some of the xml in "C:\Program Files (x86)\Windows Kits\10\Tools\sdv\smv\analysisplugins\sdv\configurations" to see if I can make it behave but no love so far. There seems to be a fair bit of code in there determined to remove the trailing '\' from SolutionDir but changing it around just causes other failures.

Anyone got any ideas?

Chris

Comments

  • Jan_BottorffJan_Bottorff Posts: 468
    Usually when I suspect some filename strangeness error, I run SysInternals process monitor, and then run my software under test. Then in the process monitor log, look for things like file open errors. It shows the pathname it was trying to use, and sometimes it's then apparent what's incorrect.

    I believe you can get msbuild to write a debug log of what it wants to run and why. I've had my share of debugging cryptic SDV errors, and it's not high on my fun list. There are some SDV debug logs you can enable too.

    Jan

    -----Original Message-----
    From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> On Behalf Of xxxxx@pleora.com
    Sent: Monday, May 14, 2018 11:47 AM
    To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    Subject: [ntdev] Static Driver Verifier build issue

    I'm having a quirky problem with running SDV on my project. I'm using VS2017 and the latest WDK.

    The build phase complains about failing even though I can build everything just fine either through the IDE or using MSBuild directly. The error messages are fairly opaque but dialing up the debug and looking at some logs has shown me the cause but not the solution.

    It seems like the link phase is building the output into an 'odd' directory. That is, I have a project folder of ebUniversalProForU3V which is where everything should take place. At some phase of the build, it winds up creating and using a ebUniversalProForU3Vx64 folder and putting the .sys, .inf, .pdb files in there.

    From sniffing through the logs it looks like it then can't find its own output and gets confused. To me it looks like a '\' is getting dropped and it should be ebUniversalProForU3V\x64 but for the life of me I can't figure out where it's happening. I've been mucking around with some of the xml in "C:\Program Files (x86)\Windows Kits\10\Tools\sdv\smv\analysisplugins\sdv\configurations" to see if I can make it behave but no love so far. There seems to be a fair bit of code in there determined to remove the trailing '\' from SolutionDir but changing it around just causes other failures.

    Anyone got any ideas?

    Chris





    ---
    NTDEV is sponsored by OSR

    Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev>;

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at <http://www.osr.com/seminars>;

    To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer>;
  • Hi Jan,

    Thanks for responding. Unfortunately I had already done that. I used procmon and the various debug logs to trace it down to the link stage and see where it's putting the output. Now I'm stuck because I'm trying to tweak things both in the project settings and in the sdv configuration files and not getting anywhere.

    I was hoping someone had seen something similar and might have some clues as to where to start.

    cheers,

    Chris
  • Scott_Noone_(OSR)Scott_Noone_(OSR) Posts: 3,010
    Is it just your project that you're having trouble with or all projects? I'd start by grabbing a sample or using the wizard to generate a template project and see if I got the same problem.

    -scott
    OSR
    @OSRDrivers

    -scott
    OSR

  • Ooh!! Great idea. That's a good divide and conquer. Thanks Scott.
  • Yes it seems to run okay on a template project. I'll start looking at the settings of my project and see what's different.

    Thanks for helping narrow it down.

    cheers,

    Chris
  • Tim_RobertsTim_Roberts Posts: 12,623
    xxxxx@pleora.com wrote:
    > I'm having a quirky problem with running SDV on my project. I'm using VS2017 and the latest WDK.
    >
    > The build phase complains about failing even though I can build everything just fine either through the IDE or using MSBuild directly. The error messages are fairly opaque but dialing up the debug and looking at some logs has shown me the cause but not the solution.
    >
    > It seems like the link phase is building the output into an 'odd' directory. That is, I have a project folder of ebUniversalProForU3V which is where everything should take place. At some phase of the build, it winds up creating and using a ebUniversalProForU3Vx64 folder and putting the .sys, .inf, .pdb files in there.

    Are you able to post your vcxproj?  Perhaps one of us can spot something.

    If ebUniversalProForU3V is the project folder, where do you want the
    binaries?  The default project files will put the intermediate (.obj)
    and final (.sys) files into:
      ebUniversalProForU3V\Debug
      ebUniversalProForU3V\Release
      ebUniversalProForU3V\x64\Debug
      ebUniversalProForU3V\x64\Release

    Personally, I hate this, so I always modify the vcxproj to use Debug,
    Release, Debug64, and Release64.  That means I have some experience with
    tweaking vcxproj files.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Hi Tim,

    The weird x64 suffix seems to be a red herring. When I made a template project to test the SDV it actually did the exact same thing and still worked just fine:

    xxxxx@cwarkentin MINGW64 ~/Documents/Visual Studio 2017/Projects/USB Driver1
    $ ls
    USB Driver1/ USB Driver1.sln USB Driver1x64/ x64/

    Here's the project file. One other thing that got me wondering. I saw another post within this mailing list about SDV where the person said it wasn't working when there were still static analysis warnings in the project. I still have a few (benign) warnings that I haven't cleaned up. Could that be it?

    <?xml version="1.0" encoding="utf-8"?>
    <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
    <Configuration>Debug</Configuration>
    <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
    <Configuration>Release</Configuration>
    <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
    <Configuration>Debug</Configuration>
    <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
    <Configuration>Release</Configuration>
    <Platform>x64</Platform>
    </ProjectConfiguration>
    </ItemGroup>
    <PropertyGroup Label="Globals">
    <ProjectGuid>{8C3E8345-1FED-4719-A9F2-0DC3DA7EE410}</ProjectGuid>
    <TemplateGuid>{8b1800b9-d017-4029-9785-13ef5e5b328e}</TemplateGuid>
    <Keyword>Converted Driver Project</Keyword>
    <RootNamespace>ndislwf.vcxproj</RootNamespace>
    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
    <Configuration>Debug</Configuration>
    <Platform Condition="'$(Platform)' == ''">Win32</Platform>
    <RootNamespace>ebUniversalProForEthernet</RootNamespace>
    <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
    <!--
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
    <ConfigurationType>Driver</ConfigurationType>
    <DriverType>WDM</DriverType>
    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
    <ConfigurationType>Driver</ConfigurationType>
    <DriverType>WDM</DriverType>
    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
    <ConfigurationType>Driver</ConfigurationType>
    <DriverType>WDM</DriverType>
    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
    <ConfigurationType>Driver</ConfigurationType>
    <DriverType>WDM</DriverType>
    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    </PropertyGroup>
    <PropertyGroup>
    <TestCertificate>S:\sw\win-x86_64\..\res\Certs\TestCertificate.pfx</TestCertificate>
    <CrossCertificateFile>S:\sw\win-x86_64\..\res\Certs\MSCV-VSClass3.cer</CrossCertificateFile>
    <ProductionCertificate>E=xxxxx@pleora.com, CN=Pleora Technologies Inc., O=Pleora Technologies Inc., L=Ottawa, S=Ontario, C=CA | B56C24DACDD3FEF21FDD0E431318BBCF6B678663</ProductionCertificate>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <SignMode>Off</SignMode>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <SignMode>Off</SignMode>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <SignMode>Off</SignMode>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <SignMode>Off</SignMode>
    </PropertyGroup>
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <TargetVersion>Windows7</TargetVersion>
    <UseDebugLibraries>true</UseDebugLibraries>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <TargetVersion>Windows7</TargetVersion>
    <UseDebugLibraries>false</UseDebugLibraries>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <TargetVersion>Windows7</TargetVersion>
    <UseDebugLibraries>true</UseDebugLibraries>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <TargetVersion>Windows7</TargetVersion>
    <UseDebugLibraries>false</UseDebugLibraries>
    </PropertyGroup>
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    <ImportGroup Label="ExtensionSettings" />
    <ImportGroup Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    </ImportGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
    <OutputName>ndislwf</OutputName>
    <IncludePath>$(IntDir);$(ProjectDir);$(IncludePath)</IncludePath>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <RunCodeAnalysis>true</RunCodeAnalysis>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
    <OutputName>ndislwf</OutputName>
    <IncludePath>$(IntDir);$(ProjectDir);$(IncludePath)</IncludePath>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <RunCodeAnalysis>true</RunCodeAnalysis>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
    <OutputName>ndislwf</OutputName>
    <IncludePath>$(IntDir);$(ProjectDir);$(IncludePath)</IncludePath>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <RunCodeAnalysis>true</RunCodeAnalysis>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
    <OutputName>ndislwf</OutputName>
    <IncludePath>$(IntDir);$(ProjectDir);$(IncludePath)</IncludePath>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <RunCodeAnalysis>true</RunCodeAnalysis>
    <OutDir>$(SolutionDir)\$(Platform)</OutDir>
    </PropertyGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
    <WarningLevel>Level4</WarningLevel>
    <TreatWarningAsError>false</TreatWarningAsError>
    <AdditionalIncludeDirectories>..;.;S:\sw\win-x86_64\..\inc;S:\sw\win-x86_64\..\Includes;S:\sw\win-x86_64\..\swcommon\inc;S:\sw\win-x86_64\..\swcommon\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    <PreProcessorDefinitions>%(PreProcessorDefinitions);NDIS_WDM=1;POOL_NX_OPTIN=1;NDIS630=1;WIN32;_PT_DEBUG_=1;OS_TAG_ENABLED;_PT_KERNEL_=1;_PT_NDIS_=1;NDIS_SUPPORT_NDIS620=1;NDISLWF=1;DIS_USE_MAP=1;DIS_SUPPORT_PIT=1;DIS_SUPPORT_PIG=1;PCAP_FILTER_SUPPORT=1;PIG_LOGTOBUFFER=1;PIG_QUEUESENDPACKETS=1;GDR_LOCK_WAITER_ACCESS=1;GTR_LOCK_WAITER_ACCESS=1;GDR_PACKETS_POOL=1;GDR_ONLY_PROCESS_RESEND_DURING_MAINTENANCE=1;GTR_SUPPORT_CANCEL=1</PreProcessorDefinitions>
    <DisableSpecificWarnings>%(DisableSpecificWarnings);4201;4214</DisableSpecificWarnings>
    <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile>
    <PreCompiledHeader>NotUsing</PreCompiledHeader>
    </ClCompile>
    <ResourceCompile>
    <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..;.;</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
    <AdditionalDependencies>%(AdditionalDependencies);ndis.lib</AdditionalDependencies>
    </Link>
    </ItemDefinitionGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
    <WarningLevel>Level4</WarningLevel>
    <TreatWarningAsError>false</TreatWarningAsError>
    <AdditionalIncludeDirectories>..;.;S:\sw\win-x86_64\..\inc;S:\sw\win-x86_64\..\Includes;S:\sw\win-x86_64\..\swcommon\inc;S:\sw\win-x86_64\..\swcommon\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    <PreProcessorDefinitions>%(PreProcessorDefinitions);NDIS_WDM=1;POOL_NX_OPTIN=1;NDIS630=1;WIN32;_PT_DEBUG_=1;OS_TAG_ENABLED;_PT_KERNEL_=1;_PT_NDIS_=1;NDIS_SUPPORT_NDIS620=1;NDISLWF=1;DIS_USE_MAP=1;DIS_SUPPORT_PIT=1;DIS_SUPPORT_PIG=1;PCAP_FILTER_SUPPORT=1;PIG_LOGTOBUFFER=1;PIG_QUEUESENDPACKETS=1;GDR_LOCK_WAITER_ACCESS=1;GTR_LOCK_WAITER_ACCESS=1;GDR_PACKETS_POOL=1;GDR_ONLY_PROCESS_RESEND_DURING_MAINTENANCE=1;GTR_SUPPORT_CANCEL=1</PreProcessorDefinitions>
    <DisableSpecificWarnings>%(DisableSpecificWarnings);4201;4214</DisableSpecificWarnings>
    <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile>
    <PreCompiledHeader>NotUsing</PreCompiledHeader>
    </ClCompile>
    <ResourceCompile>
    <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..;.;</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
    <AdditionalDependencies>%(AdditionalDependencies);ndis.lib</AdditionalDependencies>
    </Link>
    </ItemDefinitionGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
    <WarningLevel>Level4</WarningLevel>
    <TreatWarningAsError>false</TreatWarningAsError>
    <AdditionalIncludeDirectories>..;.;S:\sw\win-x86_64\..\inc;S:\sw\win-x86_64\..\Includes;S:\sw\win-x86_64\..\swcommon\inc;S:\sw\win-x86_64\..\swcommon\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    <PreProcessorDefinitions>%(PreProcessorDefinitions);NDIS_WDM=1;POOL_NX_OPTIN=1;NDIS630=1;WIN32;_PT_DEBUG_=1;_PT_64_=1;OS_TAG_ENABLED;_PT_KERNEL_=1;_PT_NDIS_=1;NDIS_SUPPORT_NDIS620=1;NDISLWF=1;DIS_USE_MAP=1;DIS_SUPPORT_PIT=1;DIS_SUPPORT_PIG=1;PCAP_FILTER_SUPPORT=1;PIG_LOGTOBUFFER=1;PIG_QUEUESENDPACKETS=1;GDR_LOCK_WAITER_ACCESS=1;GTR_LOCK_WAITER_ACCESS=1;GDR_PACKETS_POOL=1;GDR_ONLY_PROCESS_RESEND_DURING_MAINTENANCE=1;GTR_SUPPORT_CANCEL=1</PreProcessorDefinitions>
    <DisableSpecificWarnings>%(DisableSpecificWarnings);4201;4214</DisableSpecificWarnings>
    <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile>
    <PreCompiledHeader>NotUsing</PreCompiledHeader>
    </ClCompile>
    <ResourceCompile>
    <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..;.;</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
    <AdditionalDependencies>%(AdditionalDependencies);ndis.lib</AdditionalDependencies>
    </Link>
    </ItemDefinitionGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
    <WarningLevel>Level4</WarningLevel>
    <TreatWarningAsError>false</TreatWarningAsError>
    <AdditionalIncludeDirectories>..;.;S:\sw\win-x86_64\..\inc;S:\sw\win-x86_64\..\Includes;S:\sw\win-x86_64\..\swcommon\inc;S:\sw\win-x86_64\..\swcommon\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    <PreProcessorDefinitions>%(PreProcessorDefinitions);NDIS_WDM=1;POOL_NX_OPTIN=1;NDIS630=1;WIN32;_PT_DEBUG_=1;_PT_64_=1;OS_TAG_ENABLED;_PT_KERNEL_=1;_PT_NDIS_=1;NDIS_SUPPORT_NDIS620=1;NDISLWF=1;DIS_USE_MAP=1;DIS_SUPPORT_PIT=1;DIS_SUPPORT_PIG=1;PCAP_FILTER_SUPPORT=1;PIG_LOGTOBUFFER=1;PIG_QUEUESENDPACKETS=1;GDR_LOCK_WAITER_ACCESS=1;GTR_LOCK_WAITER_ACCESS=1;GDR_PACKETS_POOL=1;GDR_ONLY_PROCESS_RESEND_DURING_MAINTENANCE=1;GTR_SUPPORT_CANCEL=1</PreProcessorDefinitions>
    <DisableSpecificWarnings>%(DisableSpecificWarnings);4201;4214</DisableSpecificWarnings>
    <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile>
    <PreCompiledHeader>NotUsing</PreCompiledHeader>
    </ClCompile>
    <ResourceCompile>
    <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..;.;</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
    <AdditionalDependencies>%(AdditionalDependencies);ndis.lib</AdditionalDependencies>
    </Link>
    </ItemDefinitionGroup>
    <ItemDefinitionGroup>
    <Inf>
    <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">6.2.0.4575</TimeStamp>
    </Inf>
    <Inf>
    <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">6.2.0.4575</TimeStamp>
    </Inf>
    <Inf>
    <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">6.2.0.4575</TimeStamp>
    </Inf>
    <Inf>
    <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Release|x64'">6.2.0.4575</TimeStamp>
    </Inf>
    </ItemDefinitionGroup>
    <ItemGroup>
    <FilesToPackage Include="$(TargetPath)" />
    <FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" />
    </ItemGroup>
    <ItemGroup>
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\DIS_Defines.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\DIS_Hardware.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\DIS_Ioctl.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\DIS_PlugIn.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\DIS_Types.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\DPCAP_Filter.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\DPCAP_Ioctl.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_API.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_Log.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_Macros.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_Missing.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_Request.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_Resend.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_ResourceManager.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GDR_Types.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GEV_Types.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GTR_API.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GTR_Buffer.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GTR_Macros.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GTR_Resend.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\GTR_Types.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\LFT_Filter.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\LFT_Public.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\LOG_Circular.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\Link.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\LinkEnabled.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\LinkWin.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\PCAP\Buffer.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\PCAP\Filter.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\PCAP\Statistic.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\PCAP\WinFilter.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\Network\ResultConverter.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_Functions.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_KMNRXPacket.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_KMNUtil.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_Macros.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_RXPacket.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_RXPacketManager.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_TXFunctions.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_Types.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\NET_Util.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Compiler.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Dispatch.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Event.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_GENLinkList.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_GENMemoryPool.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_GENNoOptimizedMemcpy.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Include.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Init.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNCompiler.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNEvent.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNInclude.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNInit.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNLock.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNMemory.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNMemoryMap.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNMisc.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNRWLock.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNSemaphore.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNString.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNThread.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNTime.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNTimer.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMNTypes.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMShareMemory.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMWMemoryMap.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_KMWNetwork.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_LinkList.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Lock.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Memory.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_MemoryMap.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_MemoryPool.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Misc.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Network.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_OptimizedMemcpy.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Result.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_RWLock.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Semaphore.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_ShareMemory.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_SIMRWLock.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_String.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_System.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Tag.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Thread.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Time.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Timer.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_Types.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_WINOptimizedMemcpy.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\OS_WorkQueue.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\PCAP_FileFormat.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\PCAP_Filter.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\PCAP_Types.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\PIG_Ioctl.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\PIT_Ioctl.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\TransportLayerLib.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\WFT6_CpuUsage.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\WFT6_Device.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\WFT6_Filter.h" />
    <ClInclude Include="S:\sw\win-x86_64\..\swcommon\inc\EbTransportLayerLib\WFT6_Global.h" />
    </ItemGroup>
    <ItemGroup>
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\DIS\DIS_Hardware.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\DIS\DIS_PlugIn.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\DPCAP\DPCAP_Filter.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GDR\GDR_API.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GDR\GDR_Missing.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GDR\GDR_Request.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GDR\GDR_Resend.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GDR\GDR_ResourceManager.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GTR\GTR_API.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GTR\GTR_Buffer.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\GTR\GTR_Resend.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\LOG\LOG_Circular.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\NET\NET_KMNRXPacket.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\NET\NET_KMNUtil.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\NET\NET_RXPacketManager.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_GENMemoryPool.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNEvent.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNInit.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNLock.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNMemoryMap.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNRWLock.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNSemaphore.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNThread.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMNTimer.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_KMShareMemory.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\OS_WINOptimizedMemcpy.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\OS\sprintf_mod.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\PCAP\PCAP_Filter.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\PIG\PIG.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\PIT\PIT.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\WFT6\WFT6_CpuUsage.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\WFT6\WFT6_Device.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\WFT6\WFT6_Filter.c" />
    <ClCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\WFT6\WFT6_Global.c" />
    </ItemGroup>
    <ItemGroup>
    <ResourceCompile Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\WFT6\WFT6_Filter.rc" />
    </ItemGroup>
    <ItemGroup>
    <Inf Include="S:\sw\win-x86_64\..\swcommon\Libraries\EbTransportLayerLib\WFT6\ebUniversalProForEthernet.inf" />
    </ItemGroup>
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    <ImportGroup Label="ExtensionTargets" />
    </Project>
  • Tim_RobertsTim_Roberts Posts: 12,623
    xxxxx@pleora.com wrote:
    > The weird x64 suffix seems to be a red herring. When I made a template project to test the SDV it actually did the exact same thing and still worked just fine:
    >
    > xxxxx@cwarkentin MINGW64 ~/Documents/Visual Studio 2017/Projects/USB Driver1
    > $ ls
    > USB Driver1/ USB Driver1.sln USB Driver1x64/ x64/
    >
    > Here's the project file.

    There's nothing in your vcxproj that sets either the IntDir or the
    OutDir, so that must be getting inherited from other settings files.

    I don't think you told us what build errors you actually see.

    It drives me nuts that vcxproj files have so much unnecessary
    duplication.  I've actually written a tool to optimize my vcxproj files.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Yeah. These are quasi generated files too. We build the drivers as part of a much larger cmake project and do some transforms on vcxproj templates to set them up relative to the source code in a throwaway build folder.

    Unfortunately the error isn't very informative. '-1'. Running from the command line it ends up with this:

    [INFO] 1 of 2 jobs remaining. Avg(s): 36.00. Std.Dev(s): 0.00[DEBUG] scheduler found for local
    [DEBUG] Executing: InterceptedBuild
    [DEBUG] cumulative exit code is 1
    [FATAL ERROR] Action: InterceptedBuild, failed.
    C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(136,9): error MSB3073: The command "staticdv /ch
    eck /devenv /debug" exited with code -1. [S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEtherne
    t\ebUniversalProForEthernet.vcxproj]
    Done Building Project "S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProFor
    Ethernet.vcxproj" (sdv target(s)) -- FAILED.


    Build FAILED.

    "S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj" (sdv
    target) (1) ->
    (sdv target) ->
    C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(136,9): error MSB3073: The command "staticdv /
    check /devenv /debug" exited with code -1. [S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEther
    net\ebUniversalProForEthernet.vcxproj]

    0 Warning(s)
    1 Error(s)
  • The smvbuild.log shows the linker error. It's frustrating because it doesn't seem to say anything beyond 'link failed.'

    Task "Link"
    C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\smv\bin\link.exe /ERRORREPORT:QUEUE /OUT:"S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\x64\ebUniversalProForEthernet.sys" /VERSION:"10.0" /INCREMENTAL:NO /NOLOGO /WX /SECTION:"INIT,d" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\BufferOverflowK.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\ntoskrnl.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\hal.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\wmilib.lib" ndis.lib /NODEFAULTLIB /MANIFEST:NO /DEBUG /PDB:"S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\x64\ebUniversalProForEthernet.pdb" /SUBSYSTEM:NATIVE,"6.01" /Driver /OPT:REF /OPT:ICF /ENTRY:"GsDriverEntry" /RELEASE /IMPLIB:"S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\x64\ebUniversalProForEthernet.lib" /MERGE:"_TEXT=.text;_PAGE=PAGE" /MACHINE:X64 /PROFILE /guard:cf /kernel /IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235 /osversion:10.0 /pdbcompress /debugtype:pdata x64\Release\WFT6_Filter.res
    x64\Release\DIS_Hardware.obj
    x64\Release\DIS_PlugIn.obj
    x64\Release\DPCAP_Filter.obj
    x64\Release\GDR_API.obj
    x64\Release\GDR_Missing.obj
    x64\Release\GDR_Request.obj
    x64\Release\GDR_Resend.obj
    x64\Release\GDR_ResourceManager.obj
    x64\Release\GTR_API.obj
    x64\Release\GTR_Buffer.obj
    x64\Release\GTR_Resend.obj
    x64\Release\LOG_Circular.obj
    x64\Release\NET_KMNRXPacket.obj
    x64\Release\NET_KMNUtil.obj
    x64\Release\NET_RXPacketManager.obj
    x64\Release\OS_GENMemoryPool.obj
    x64\Release\OS_KMNEvent.obj
    x64\Release\OS_KMNInit.obj
    x64\Release\OS_KMNLock.obj
    x64\Release\OS_KMNMemoryMap.obj
    x64\Release\OS_KMNRWLock.obj
    x64\Release\OS_KMNSemaphore.obj
    x64\Release\OS_KMNThread.obj
    x64\Release\OS_KMNTimer.obj
    x64\Release\OS_KMShareMemory.obj
    x64\Release\OS_WINOptimizedMemcpy.obj
    x64\Release\sprintf_mod.obj
    x64\Release\PCAP_Filter.obj
    x64\Release\PIG.obj
    x64\Release\PIT.obj
    x64\Release\WFT6_CpuUsage.obj
    x64\Release\WFT6_Device.obj
    x64\Release\WFT6_Filter.obj
    x64\Release\WFT6_Global.obj




    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(673,5): error MSB6006: "link.exe" exited with code 1. [S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj]
    Done executing task "Link" -- FAILED.
    Done building target "Link" in project "ebUniversalProForEthernet.vcxproj" -- FAILED.
    Done Building Project "S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj" (rebuild target(s)) -- FAILED.

    Build FAILED.

    "S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj" (rebuild target) (1) ->
    (PrepareForBuild target) ->
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory. [S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj]


    "S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj" (rebuild target) (1) ->
    (InfVerif target) ->
    S:\sw\swcommon\Libraries\EbTransportLayerLib\WFT6\ebUniversalProForEthernet.inf(43-43): warning 1205: Section [ebUniversalProForEthernet.copyfiles.sys] referenced from DelFiles and CopyFiles directive. [S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj]


    "S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj" (rebuild target) (1) ->
    (ClCompile target) ->
    s:\sw\swcommon\libraries\ebtransportlayerlib\os\os_kmnrwlock.c(18): warning C4100: 'aLock': unreferenced formal parameter [S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj]


    "S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj" (rebuild target) (1) ->
    (Link target) ->
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(673,5): error MSB6006: "link.exe" exited with code 1. [S:\sw\win-x86_64\Drivers\eBUSUniversalProForEthernet\ebUniversalProForEthernet\ebUniversalProForEthernet.vcxproj]

    3 Warning(s)
    1 Error(s)
  • Hmm...rooting around deeper in the logs under the smv folder I found an smvlink2.log with this:

    slamlink {
    slamlink invoked with args [--lib]
    scan {
    objfiles: []
    libfiles: []
    outfile: slam.lib
    scan }
    slam: error: slamlink: at least one obj or lib file must be given as input
    Unexpected exception in slamlink at phase 0
    Unexpected exception in slamlink: Failure("slamlink: at least one obj or lib file must be given as input")
    error at slamlink }

    I'm now looking at the commandline to link.exe above where all the object files are on subsequent lines. I wonder if that's it.

    I went back to the template project and looked at its link line and it has this:

    C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\smv\bin\link.exe /ERRORREPORT:QUEUE /OUT:"S:\Documents\Visual Studio 2017\Projects\USB Driver1\USB Driver1x64\Release\USBDriver1.sys" /VERSION:"10.0" /INCREMENTAL:NO /NOLOGO /WX /SECTION:"INIT,d" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\BufferOverflowFastFailK.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\ntoskrnl.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\hal.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\wmilib.lib" "C:\Program Files (x86)\Windows Kits\10\lib\wdf\kmdf\x64\1.15\WdfLdr.lib" "C:\Program Files (x86)\Windows Kits\10\lib\wdf\kmdf\x64\1.15\WdfDriverEntry.lib" usbdex.lib ntstrsafe.lib "C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64\wpprecorder.lib" /NODEFAULTLIB /MANIFEST:NO /DEBUG /PDB:"S:\Documents\Visual Studio 2017\Projects\USB Driver1\USB Driver1x64\Release\USBDriver1.pdb" /SUBSYSTEM:NATIVE,"10.00" /Driver /OPT:REF /OPT:ICF /ENTRY:"FxDriverEntry" /RELEASE /IMPLIB:"S:\Documents\Visual Studio 2017\Projects\USB Driver1\USB Driver1x64\Release\USBDriver1.lib" /MERGE:"_TEXT=.text;_PAGE=PAGE" /MACHINE:X64 /PROFILE /guard:cf /kernel /IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235 /osversion:10.0 /pdbcompress /debugtype:pdata x64\Release\Device.obj
    x64\Release\Driver.obj
    x64\Release\Queue.obj
    lib is x64\Release
    lib is C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\km\x64
    lib is C:\Program Files (x86)\Windows Kits\10\lib\wdf\kmdf\x64\1.15
    lib is S:\Documents\Visual Studio 2017\Projects\USB Driver1\USB Driver1x64\Release

    And now I'm seeing the first line in the link line is a 'res' file. That doesn't seem right. Investigating.
  • <quote>
    I saw another
    post within this mailing list about SDV where the person said it wasn't working
    when there were still static analysis warnings in the project. I still have a
    few (benign) warnings that I haven't cleaned up. Could that be it?
    </quote>

    Yes, that could definitely be it.

    In MY experience, if my project doesn't build clean, it won't necessarily build at all under SDV and the error(s) reported by SDV may or may not be helpful.

    Peter
    OSR
    @OSRDrivers

    Peter Viscarola
    OSR
    @OSRDrivers

  • Thanks Peter. The res file seems also to be a red herring. I'll experiment with cleaning/suppressing the warnings and see if that helps. Frustrating tool.
  • <quote>
    Frustrating tool
    </quote>

    I agree that it CAN be. Sadly. VERY frustrating.

    Yet, when it WORKS... it can catch some AMAZING things. I was an SDV basher for a *very* long time. Then it finally reached a point where, for my projects at least, it suddenly started to add value. It's been a difficult transition over the past few versions -- Here at OSR we've found some pretty frustrating bugs.

    Anyhow... good luck and keep us apprised of your progress,

    Peter
    OSR
    @OSRDrivers

    Peter Viscarola
    OSR
    @OSRDrivers

  • Thanks. I had an idea last night that I'd like to try to make an empty standalone project and then dump the source files into it and see if it works from there. Should narrow things down to my larger solution environment or the source code itself.
  • So creating a new project out of all the existing sources seems to do the trick and SDV runs. Now I can carefully consider the differences between the projects and hopefully get to the bottom of it.

    Oddly almost all my results are 'Give Up' so I'll have to figure out what that means. Also odd but it claims 0 defects found and yet nullcheck returned Error. I guess there's a learning curve to this tool.

    Thanks for all the help so far. Much appreciated after a couple days of banging my head against it.
  • I'm getting lead down some very strange rabbit holes trying to get SDV running but I think my project is going to be much stronger in the end.

    I've been looking at diffs of the working and non-working vcxproj and trying to make them converge. Suddenly my original project won't build properly in VS anymore either with a bunch of complaints like this:

    1>ApiValidation : warning : API SetupOpenLog in setupapi.dll is not a supported universal API. WdfCoinstaller01011.dll calls this API.
    1>ApiValidation : warning : API SetupPromptReboot in setupapi.dll is not a supported universal API. WdfCoinstaller01011.dll calls this API.
    1>C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(1770,5): error MSB3721: The command ""C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\ApiValidator.exe" -DriverPackagePath:S:\sw\win-x86_64\x64\Release\ -SupportedApiXmlFiles:"C:\Program Files (x86)\Windows Kits\10\build\universalDDIs\x64\UniversalDDIs.xml" -ModuleWhiteListXmlFiles:"C:\Program Files (x86)\Windows Kits\10\build\universalDDIs\x64\ModuleWhiteList.xml" -ApiExtractorExePath:"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64"" exited with code -1.

    What's weird is that the working project is ALSO a universal driver (that's why I copied the setting) and it's ALSO running the API validater and it's using the exact same INF file with the coinstaller specified. It doesn't have any of these errors which doesn't make any sense.

    This got me questioning coinstallers in general and leads me to https://www.osr.com/nt-insider/2016-issue1/bye-bye-co-installers/. So if I'm building on Windows 10 but targeting Windows 7 I should still be able to remove the coinstaller as long as I'm using KMDF 1.11?
  • Turns out the inf file had a variable for coinstaller version so that explains the lack of APIValidator warnings.

    Still leaves me wondering if I can get rid of it though and whether KMDF version is behind my SDV problems.
  • VICTORY! (sort of)

    I figured it out by working backwards until I broke the original project. It turns out that it needs the wdfcoinstaller DLL in the right place in order to link properly. I guess it's looking for it in the build output folder so for SDV it's not there since it's a different location.

    This brings up a question though. Our build seems to do some wacky stuff by copying the coinstaller DLL into there as part of the build process. It feels awkward and hacky but I don't really know what is the right way to do it. Is there any best practice for getting that DLL to a place where it can be signed and packaged with the sys file?
  • Tim_RobertsTim_Roberts Posts: 12,623
    xxxxx@pleora.com wrote:
    > This brings up a question though. Our build seems to do some wacky stuff by copying the coinstaller DLLinto there as part of the build process. It feels awkward and hacky but I don't really know what is the right way to do it. Is there any best practice for getting that DLL to a place where it can be signed and packaged with the sys file?

    Why does it feel awkward?  If your INF mentions the co-installer, then
    that DLL is literally part of your driver package, and needs to be
    copied into the package folder.  Is this being done as part of the
    vcxproj file?  There are build tasks for copying files like this.
    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Yay! I?m glad you found the issue. Good old SDV...

    You can use a driver ?package? project to agglomerate all the build products you need (sys file, DLL, INF, certificate file) into one place. It?s actually quite handy.

    Peter
    OSR
    @OSRDrivers

    Peter Viscarola
    OSR
    @OSRDrivers

  • @TimRoberts it was feeling awkward mostly because I didn't understand at the time that it's actually inf2cat that was copying the coinstaller. That feels more sane than when I thought we had some weird script doing it.

    @PeterV We're using a driver package project but I'm not entirely sure that it's done the way that it SHOULD be. It seems like it does nothing on its own but just has a big fat post-build script that copies everything around and signs them and such. I think it's leftover from our legacy circa 2012 projects.

    I'm still left with the problem of getting SDV to have access to the coinstaller. The 'normal' build process puts it where it belongs but SDV seems to build everything elsewhere and I don't see how I can convince it to get the coinstaller as well.
  • Ha! I was getting a sense of deja-vu and I've been down this road before.

    https://osronline.com/showthread.cfm?link=272884

    Almost 2 1/2 years ago I had done some work on revitalizing these projects that you had given some guidance with. I've been on completely unrelated work (embedded FPGA, non-windows) for a couple years and am just coming back and trying to page this all back into my head.

    In any event, the big push now is to integrate our legacy projects into VS2017, HLK, driver certification, etc. I'm taking them back to first principles and trying to make them fit into current driver best practices but keep hitting weird road blocks.

    Thanks again for all the help. I'll keep plugging away and reading the docs.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!