'Lnk1104 cannot open file debug.obj
I have a C++ project in vs 2022 that giving me a lnk1104 error. I have made sure that "debug information format " is set to Z1, but the debug.obj or the .pdb file is not being created. I am not sure why. [enter image description here][1] [enter image description here][2]
This project is being updated from vs 2013 to vs 2022(v143) I have been working on this error all day and am running out of things to try. Any help would be appreciated. [1]: https://i.stack.imgur.com/OgVcf.png [2]: https://i.stack.imgur.com/0qflT.png
<?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="Template|Win32">
<Configuration>Template</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<SccProjectName />
<SccLocalPath />
<Keyword>MFCProj</Keyword>
<ProjectGuid>{84200974-822B-4F51-A69C-B007BA2C6E29}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Template|Win32'"
Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>
</CharacterSet>
<PreferredToolArchitecture>
</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets"
Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\Debug\</OutDir>
<IntDir>.\Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(VC_IncludePath);$(WindowsSdk_71A_IncludePath);.\source\include;E:\toms_files\repo
s\P&G\Software\Trace source\pag Trace source Apr 23
2018\pagt2k\project\source\include</IncludePath>
<LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(LibraryPath)</LibraryPath>
<ExecutablePath>$(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_Exe
cutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);
$(PATH);$(ExecutablePath)</ExecutablePath>
<LibraryWPath />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\Release\</OutDir>
<IntDir>.\Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<FunctionLevelLinking>false</FunctionLevelLinking>
<Optimization>Disabled</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefini
tions>
<AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>.\Debug\Trace2000.pch</PrecompiledHeaderOutputFile>
<ObjectFileName>.\Debug\</ObjectFileName>
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
<PreprocessToFile>false</PreprocessToFile>
<AdditionalIncludeDirectories>E:\toms_files\repos\P&G\Software\Trace source\pag Trace
source Apr 23 2018_2\pagt2k\project\source\library;E:\toms_files\repos\P&G\Software\Trace
source\pag Trace source Apr 23
2018_2\pagt2k\project\source\resources;.\source\include;.\source\library;E:\toms_files\repos\P&
G\Software\Trace source\pag Trace source Apr 23
2018\pagt2k\project\$(ConfigurationName);E:\toms_files\repos\P&G\Software\Trace source\pag
Trace source Apr 23 2018\pagt2k\project\source\include;E:\toms_files\repos\P&G\Software\Trace
source\pag Trace source Apr 23
2018\pagt2k\project\source\resources;E:\toms_files\repos\P&G\Software\Trace source\pag Trace
source Apr 23 2018\pagt2k\project\source\library;C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Debug\Trace2000.tlb</TypeLibraryName>
<MkTypLibCompatible>true</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug\Trace2000.bsc</OutputFile>
</Bscmake>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OutputFile>.\Debug\Trace2000.exe</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AssemblyDebug>
</AssemblyDebug>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<MinimumRequiredVersion>
</MinimumRequiredVersion>
<ShowProgress>LinkVerboseLib</ShowProgress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<Optimization>MaxSpeed</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefini
tions>
<AssemblerListingLocation>.\Release\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>.\Release\Trace2000.pch</PrecompiledHeaderOutputFile>
<ObjectFileName>.\Release\</ObjectFileName>
<ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
</ClCompile>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Release\Trace2000.tlb</TypeLibraryName>
<MkTypLibCompatible>true</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release\Trace2000.bsc</OutputFile>
</Bscmake>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<SubSystem>Windows</SubSystem>
<OutputFile>.\Release\Trace2000.exe</OutputFile>
<AdditionalLibraryDirectories>\Trace2K\Project\AgvLib\Release;\Trace2K\Project\TcsLib\Release;%(Add
itionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>agvlib.lib;tcslib.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDepende
ncies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Source\Library\Trace2000.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Source\Library\AgvLib.rc">
<AdditionalIncludeDirectories
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Source\Library;%(AdditionalIncludeDirect
ories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Source\Library;%(AdditionalIncludeDirec
tories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Docs\ReleaseNotes.doc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="agvbld\AgvBld.vcxproj">
<Project>{c14c5a4f-54ca-4e16-baeb-873117304e5b}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="agvctlsd\AgvCtlSD.vcxproj">
<Project>{25f2e990-80d5-4f20-beb3-afd2f5cf78b9}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="agvctl\AgvCtl.vcxproj">
<Project>{c707a040-a978-4d8e-a81c-ee36b65988e9}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="agvsta\AgvSta.vcxproj">
<Project>{9e5af95d-0688-4fd3-87eb-33f82ca10d7b}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="agvsum\AgvSum.vcxproj">
<Project>{de9d9907-bbc4-436c-9fdb-4e8e9523cecd}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="almmon\AlmMon.vcxproj">
<Project>{9c6781bc-7de8-4a10-af0c-177688ab2c6d}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="hdl\hdl.vcxproj">
<Project>{44bf4dc8-4139-4c11-8ada-71b1f75bdac8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="infsvr\InfSvr.vcxproj">
<Project>{ddc9336d-e536-4ac7-91ef-1b04ab741531}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="logmon\LogMon.vcxproj">
<Project>{0ed1f15b-07bb-4868-aef3-9c6480bdbc65}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="LogSearch\LogSearch.vcxproj">
<Project>{1def9cfa-a6a6-4d29-9e29-635956617b5d}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="logsvr\LogSvr.vcxproj">
<Project>{8f6e952f-e000-43e4-9f45-135140b30a67}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="msggen\MsgGen.vcxproj">
<Project>{8ca7261e-ee13-4606-8c0d-499cc5781b28}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="OptComEnetIP\OptComEnetIP.vcxproj">
<Project>{ffc1d900-5bf5-4c7e-8f65-c3a7add6efdd}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="OptComKTX\OptComKTX.vcxproj">
<Project>{13738c96-05a7-43ea-b962-b5d227f184f3}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="optcom\OptCom.vcxproj">
<Project>{1bd5e548-243d-4943-af68-8dc62abb7851}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="optsta\OptSta.vcxproj">
<Project>{68828d43-fd9f-4324-9507-6ca769abb895}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="ordsta\OrdSta.vcxproj">
<Project>{b384eecf-6558-4342-8de5-91d45138415a}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="prcmgr\PrcMgr.vcxproj">
<Project>{e5bac58c-5c79-4964-b681-e3e109310ddd}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="prmedt\PrmEdt.vcxproj">
<Project>{6b1da190-2b97-4d67-9fa3-c43af992aecb}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="wait\WAIT.vcxproj">
<Project>{807ce733-e5e7-4300-a6de-5552fcc30756}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
Project cpp file
#include "stdafx.h"
#include "tcsdef.h"
#include <AgvObject.h>
#include <Windows.h>
//#include "library.h"
//#pragma comment(lib,"AgcLib.lib")
int WINAPI WinMain(
HINSTANCE hInstance, // Instance handle
HINSTANCE hPrevInstance, // Previous instance handle
LPSTR lpszCommandLine, // Command line string
int cmdShow ) // ShowWindow flag
{
AgvObject AObj;
CString msg;
CString title;
title = "Trace2k";
msg = "Trace2k Version information\n";
msg += AObj.GetResVersion();
msg += "\nAgvObject Source ";
//msg += AObj.GetVersion();
MessageBox(GetDesktopWindow(), msg, title, MB_SYSTEMMODAL | MB_OK | MB_ICONINFORMATION);
return 0;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|