Windows 10 Pro 上的 wxWidgets 应用程序存在链接器错误

问题描述 投票:0回答:1

我有一个在 MacOS 和 Linux 上构建良好的 wxWidget 应用程序。在 Windows 10 Pro 上,我使用 MSVC 创建了一个空项目,添加了所有必需的标头和库路径。代码构建良好,但在链接时,它仅与 wxbase32u.lib 链接。这似乎是不够的,因为它会抛出 918 错误。根据文档,MSVC 的#pragma comment(lib) 应该会自动获取所有必需的库,但它并没有这样做。关于如何解决此问题的任何指示?

TIA

Severity
Code
Description
Project
File
Line
Suppression State
Error
LNK2001
unresolved external symbol "public: static class wxString __cdecl wxString::FromAscii(char const *)" (?FromAscii@wxString@@SA?AV1@PEBD@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "private: static struct wxString::SubstrBufFromType<class wxScopedCharTypeBuffer<wchar_t> > __cdecl wxString::ConvertStr(char const *,unsigned __int64,class wxMBConv const &)" (?ConvertStr@wxString@@CA?AU?$SubstrBufFromType@V?$wxScopedCharTypeBuffer@_W@@@1@PEBD_KAEBVwxMBConv@@@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: __cdecl wxEvent::wxEvent(int,int)" (??0wxEvent@@QEAA@HH@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "protected: __cdecl wxEvent::wxEvent(class wxEvent const &)" (??0wxEvent@@IEAA@AEBV0@@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: virtual __cdecl wxNodeBase::~wxNodeBase(void)" (??1wxNodeBase@@UEAA@XZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: __cdecl wxNodeBase::wxNodeBase(class wxListBase *,class wxNodeBase *,class wxNodeBase *,void *,class wxListKey const &)" (??0wxNodeBase@@QEAA@PEAVwxListBase@@PEAV0@1PEAXAEBVwxListKey@@@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@YAXPEBDH000@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,wchar_t const *)" (?wxOnAssert@@YAXPEBDH00PEB_W@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "char const * const wxNotebookNameStr" (?wxNotebookNameStr@@3QBDB)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "protected: void __cdecl wxArrayString::Init(bool)" (?Init@wxArrayString@@IEAAX_N@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: __cdecl wxArrayString::~wxArrayString(void)" (??1wxArrayString@@QEAA@XZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: class wxArrayString & __cdecl wxArrayString::operator=(class wxArrayString const &)" (??4wxArrayString@@QEAAAEAV0@AEBV0@@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "protected: virtual class wxEventHashTable & __cdecl wxGrid::GetEventHashTable(void)const " (?GetEventHashTable@wxGrid@@MEBAAEAVwxEventHashTable@@XZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "protected: virtual struct wxEventTable const * __cdecl wxGrid::GetEventTable(void)const " (?GetEventTable@wxGrid@@MEBAPEBUwxEventTable@@XZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: virtual class wxClassInfo * __cdecl wxGrid::GetClassInfo(void)const " (?GetClassInfo@wxGrid@@UEBAPEAVwxClassInfo@@XZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "private: virtual class wxSize __cdecl wxGrid::GetSizeAvailableForScrollTarget(class wxSize const &)" (?GetSizeAvailableForScrollTarget@wxGrid@@EEAA?AVwxSize@@AEBV2@@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "protected: void __cdecl wxGrid::Init(void)" (?Init@wxGrid@@IEAAXXZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "protected: virtual void __cdecl wxGrid::DoEnable(bool)" (?DoEnable@wxGrid@@MEAAX_N@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "protected: virtual class wxSize __cdecl wxGrid::DoGetBestSize(void)const " (?DoGetBestSize@wxGrid@@MEBA?AVwxSize@@XZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: virtual void __cdecl wxGrid::SetFocus(void)" (?SetFocus@wxGrid@@UEAAXXZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: virtual void __cdecl wxGrid::Fit(void)" (?Fit@wxGrid@@UEAAXXZ)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: virtual void __cdecl wxGrid::SetDropTarget(class wxDropTarget *)" (?SetDropTarget@wxGrid@@UEAAXPEAVwxDropTarget@@@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

Error
LNK2001
unresolved external symbol "public: virtual class wxGridCellRenderer * __cdecl wxGrid::GetDefaultRendererForType(class wxString const &)const " (?GetDefaultRendererForType@wxGrid@@UEBAPEAVwxGridCellRenderer@@AEBVwxString@@@Z)
visor_wx_win
C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\dlg_display_logs.obj
1

这是构建输出,因为它超出了 SO 主体大小限制而被剪断了

Build started...
1>------ Build started: Project: visor_wx_win, Configuration: Release x64 ------
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Analysis.props(24,5): warning MSB4211: The property "MsvcAnalysisPluginPath" is being set to a value for the first time, but it was already consumed at "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CodeAnalysis.Extensions.props (33,5)".
1>dlg_display_logs.cpp
1>dlg_get_settings.cpp
1>dlg_show_fw_list.cpp
1>network_thread.cpp
1>sftp_thread.cpp
1>utils.cpp
1>visor.cpp
1>visor_frame.cpp
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(701,19): warning C4101: 'buf': unreferenced local variable
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(1671,10): warning C4101: 'version': unreferenced local variable
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(2132,19): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(2491,9): warning C4101: 'len': unreferenced local variable
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(2485,11): warning C4101: 'asciiBuf': unreferenced local variable
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(2677,9): warning C4101: 'devNameLength': unreferenced local variable
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(2676,9): warning C4101: 'strLength': unreferenced local variable
1>C:\Users\LK\projects\visor_wxwidgets\server\visor_frame.cpp(2755,13): warning C4101: 'devNameLength': unreferenced local variable
1>dlg_display_logs.obj : error LNK2001: unresolved external symbol "public: static class wxString __cdecl wxString::FromAscii(char const *)" (?FromAscii@wxString@@SA?AV1@PEBD@Z)
1>dlg_display_logs.obj : error LNK2001: unresolved external symbol "private: static struct wxString::SubstrBufFromType<class wxScopedCharTypeBuffer<wchar_t> > __cdecl wxString::ConvertStr(char const *,unsigned __int64,class wxMBConv const &)" (?ConvertStr@wxString@@CA?AU?$SubstrBufFromType@V?$wxScopedCharTypeBuffer@_W@@@1@PEBD_KAEBVwxMBConv@@@Z)
1>dlg_display_logs.obj : error LNK2001: unresolved external symbol "public: __cdecl wxEvent::wxEvent(int,int)" (??0wxEvent@@QEAA@HH@Z)
1>dlg_display_logs.obj : error LNK2001: unresolved external symbol "protected: __cdecl wxEvent::wxEvent(class wxEvent const &)" (??0wxEvent@@IEAA@AEBV0@@Z)

----- snip ----

1>visor_frame.obj : error LNK2001: unresolved external symbol "public: void __cdecl wxSocketBase::Notify(bool)" (?Notify@wxSocketBase@@QEAAX_N@Z)
1>visor_frame.obj : error LNK2001: unresolved external symbol "public: void __cdecl wxSocketBase::SetNotify(int)" (?SetNotify@wxSocketBase@@QEAAXH@Z)
1>visor_frame.obj : error LNK2001: unresolved external symbol "public: void __cdecl wxSocketBase::SetEventHandler(class wxEvtHandler &,int)" (?SetEventHandler@wxSocketBase@@QEAAXAEAVwxEvtHandler@@H@Z)
1>visor_frame.obj : error LNK2001: unresolved external symbol "public: void __cdecl wxSocketBase::SetFlags(int)" (?SetFlags@wxSocketBase@@QEAAXH@Z)
1>visor_frame.obj : error LNK2001: unresolved external symbol "public: __cdecl wxMutex::wxMutex(enum wxMutexType)" (??0wxMutex@@QEAA@W4wxMutexType@@@Z)
1>C:\Users\LK\projects\visor_wxwidgets\visor_wx_win\x64\Release\visor_wx_win.exe : fatal error LNK1120: 917 unresolved externals
1>Done building project "visor_wx_win.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 4:39 PM and took 20.824 seconds ==========

这是.sln文件

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33627.172
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "visor_wx_win", "visor_wx_win.vcxproj", "{CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}"
EndProject
Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|x64 = Debug|x64
                Debug|x86 = Debug|x86
                DLL Debug|x64 = DLL Debug|x64
                DLL Debug|x86 = DLL Debug|x86
                DLL Release|x64 = DLL Release|x64
                DLL Release|x86 = DLL Release|x86
                Release|x64 = Release|x64
                Release|x86 = Release|x86
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Debug|x64.ActiveCfg = Debug|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Debug|x64.Build.0 = Debug|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Debug|x86.ActiveCfg = Debug|Win32
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Debug|x86.Build.0 = Debug|Win32
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Debug|x64.ActiveCfg = Debug|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Debug|x64.Build.0 = Debug|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Debug|x86.ActiveCfg = Debug|Win32
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Debug|x86.Build.0 = Debug|Win32
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Release|x64.ActiveCfg = Release|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Release|x64.Build.0 = Release|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Release|x86.ActiveCfg = Release|Win32
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.DLL Release|x86.Build.0 = Release|Win32
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Release|x64.ActiveCfg = Release|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Release|x64.Build.0 = Release|x64
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Release|x86.ActiveCfg = Release|Win32
                {CDEB4905-D7C0-41E3-A0A3-5B9BF6FE26A4}.Release|x86.Build.0 = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
        EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
                SolutionGuid = {CABF3B0F-E922-4EDD-B298-55C81861BE4D}
        EndGlobalSection
EndGlobal

这是 .vcxproj 文件

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" 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">
    <VCProjectVersion>16.0</VCProjectVersion>
    <Keyword>Win32Proj</Keyword>
    <ProjectGuid>{cdeb4905-d7c0-41e3-a0a3-5b9bf6fe26a4}</ProjectGuid>
    <RootNamespace>visorwxwin</RootNamespace>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
    </ClCompile>
    <Link>
      <SubSystem>Console</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
    </ClCompile>
    <Link>
      <SubSystem>Console</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
    </ClCompile>
    <Link>
      <SubSystem>Console</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <AdditionalIncludeDirectories>$(OPEN_SSL)\include;$(LIBSSH2)\include;$(WXWIN)\include;$(WXWIN)\include\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalLibraryDirectories>$(WXWIN)\lib\vc_x64_lib</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\server\dlg_display_logs.cpp" />
    <ClCompile Include="..\server\dlg_get_settings.cpp" />
    <ClCompile Include="..\server\dlg_show_fw_list.cpp" />
    <ClCompile Include="..\server\network_thread.cpp" />
    <ClCompile Include="..\server\sftp_thread.cpp" />
    <ClCompile Include="..\server\utils.cpp" />
    <ClCompile Include="..\server\visor.cpp" />
    <ClCompile Include="..\server\visor_frame.cpp">
      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\common\buffer_io.h" />
    <ClInclude Include="..\common\common.h" />
    <ClInclude Include="..\server\dlg_display_logs.h" />
    <ClInclude Include="..\server\dlg_get_settings.h" />
    <ClInclude Include="..\server\dlg_show_fw_list.h" />
    <ClInclude Include="..\server\embedded_image_data.h" />
    <ClInclude Include="..\server\network_thread.h" />
    <ClInclude Include="..\server\server_common.h" />
    <ClInclude Include="..\server\sftp_thread.h" />
    <ClInclude Include="..\server\utils.h" />
    <ClInclude Include="..\server\visor.h" />
    <ClInclude Include="..\server\visor_frame.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

这是 .vcxproj.filters

╗┐<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="Source Files">
      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
      <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    </Filter>
    <Filter Include="Header Files">
      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
      <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
    </Filter>
    <Filter Include="Resource Files">
      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\server\dlg_display_logs.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\server\dlg_get_settings.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\server\dlg_show_fw_list.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\server\network_thread.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\server\sftp_thread.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\server\utils.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\server\visor.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\server\visor_frame.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\server\dlg_display_logs.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\dlg_get_settings.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\dlg_show_fw_list.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\embedded_image_data.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\network_thread.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\server_common.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\sftp_thread.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\utils.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\visor.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\server\visor_frame.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\common\buffer_io.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\common\common.h">
      <Filter>Header Files</Filter>
    </ClInclude>
  </ItemGroup>
</Project>

这是 .users 文件

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup />
</Project>
wxwidgets
1个回答
0
投票

您没有链接到“核心”wxWidgets 库 (

wxmsw32u_core.lib
),因此出现链接错误也就不足为奇了。您确实需要链接它,您可以通过以下方式完成:

  1. 只需按照文档中的
    描述
    使用wxwidgets.props——推荐。
  2. 设置包含路径,以便
    include/msvc
    目录存在并依赖自动链接。
  3. 只需明确链接到上面的库(以及您使用的任何其他库)。

但令人惊讶的是,您期望事情在不执行上述任何操作的情况下都能正常工作。

© www.soinside.com 2019 - 2024. All rights reserved.