LNK2001 when building (Issue #22492)

374 views
Skip to first unread message

earthjasonlin

unread,
Jun 6, 2022, 7:29:36 AM6/6/22
to wx-...@googlegroups.com, Subscribed

错误	LNK2001	无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "protected: static class wxAppConsole * (__cdecl* wxAppConsoleBase::ms_appInitFn)(void)" (?ms_appInitFn@wxAppConsoleBase@@1P6APAVwxAppConsole@@XZA)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\Main.obj	1	

错误	LNK2001	无法解析的外部符号 "protected: static class wxAppConsole * wxAppConsoleBase::ms_appInstance" (?ms_appInstance@wxAppConsoleBase@@1PAVwxAppConsole@@A)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\Main.obj	1	

错误	LNK2001	无法解析的外部符号 "bool wxTrapInAssert" (?wxTrapInAssert@@3_NA)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "class wxMBConv * wxConvLibcPtr" (?wxConvLibcPtr@@3PAVwxMBConv@@A)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "wchar_t const * const wxEmptyString" (?wxEmptyString@@3PB_WB)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "public: static unsigned int const wxString::npos" (?npos@wxString@@2IB)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "private: static unsigned long wxThread::ms_idMainThread" (?ms_idMainThread@wxThread@@0KA)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "char const * const wxLOG_COMPONENT" (?wxLOG_COMPONENT@@3PBDB)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "private: static bool wxLog::ms_doLog" (?ms_doLog@wxLog@@0_NA)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "class wxSize const wxDefaultSize" (?wxDefaultSize@@3VwxSize@@B)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "class wxPoint const wxDefaultPosition" (?wxDefaultPosition@@3VwxPoint@@B)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "class wxEventTypeTag<class wxCommandEvent> const wxEVT_MENU" (?wxEVT_MENU@@3V?$wxEventTypeTag@VwxCommandEvent@@@@B)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "char const * const wxFrameNameStr" (?wxFrameNameStr@@3QBDB)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2001	无法解析的外部符号 "char const * const wxStatusLineNameStr" (?wxStatusLineNameStr@@3QBDB)	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\MainFrame.obj	1	

错误	LNK2019	无法解析的外部符号 _main,函数 "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) 中引用了该符号	fsserver-manager	I:\Projects\futuresim\fsserver-manager\fsserver-manager\LIBCMTD.lib(exe_main.obj)	1	

错误	LNK1120	16 个无法解析的外部命令	fsserver-manager	I:\Projects\futuresim\fsserver-manager\Debug\fsserver-manager.exe	1	

Platform and version information

  • wxWidgets version you use: 3.1.6
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 11 21H2
  • Compiler being used: MSVS 2022


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22492@github.com>

oneeyeman1

unread,
Jun 6, 2022, 7:52:08 AM6/6/22
to wx-...@googlegroups.com, Subscribed

Hi,
I presume you are building your code and not the library?
I also presume it's a new project and you didn't set it up properly.

Please read the official documentation on how to set up the new project with MSVC.

In any case - this should be closed as invalid.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22492/1147365128@github.com>

VZ

unread,
Jun 6, 2022, 9:30:31 AM6/6/22
to wx-...@googlegroups.com, Subscribed

Sorry, there is nothing we can do about this if you don't tell us what you're linking and how do you do it. In any case, it's almost definitely not an issue in a library at all, so the issue tracker but a problem with your project or make file. Please use the usual support forums if you have questions about this not answered in the documentation


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22492/1147449866@github.com>

VZ

unread,
Jun 6, 2022, 9:30:31 AM6/6/22
to wx-...@googlegroups.com, Subscribed

Closed #22492 as not planned.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/22492/issue_event/6753053853@github.com>

Brian Nixon

unread,
Apr 4, 2023, 2:18:03 PM4/4/23
to wx-...@googlegroups.com, Subscribed

For the benefit of anybody else building without reading the instructions:
This happens when you try to link against a DLL build but have compiled without defining WXUSINGDLL in the preprocessor


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22492/1496402565@github.com>

Reply all
Reply to author
Forward
0 new messages