Linker error with x64-windows-static release (Issue #22617)

423 views
Skip to first unread message

Miklós Németh

unread,
Jul 8, 2022, 3:56:45 AM7/8/22
to wx-...@googlegroups.com, Subscribed

I can compile in Visual Studio + vcpkg dynamic release, dynamic debug, static debug but static release gives me the following error.

1>main.obj : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@YAXPEBDH000@Z)
1>main.obj : error LNK2001: unresolved external symbol "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXAEBVwxString@@H000@ZEA)
1>main.obj : error LNK2001: unresolved external symbol "bool wxTrapInAssert" (?wxTrapInAssert@@3_NA)
1>C:\Users\mnemeth\source\repos\wxtest\x64\Release\wxtest.exe : fatal error LNK1120: 3 unresolved externals

I have the same issue compiling minimal sample when I remove wx_core and wc_base project


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/22617@github.com>

VZ

unread,
Jul 8, 2022, 4:53:42 AM7/8/22
to wx-...@googlegroups.com, Subscribed

This seems like a vcpkg-specific issue, i.e. it looks like they build the static release version with the debugging support totally turned off (wxDEBUG_LEVEL == 0). If this is indeed the case, you must predefine it like this for your own projects too.


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/22617/1178730607@github.com>

Miklós Németh

unread,
Jul 8, 2022, 5:06:18 AM7/8/22
to wx-...@googlegroups.com, Subscribed

Thank you.


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/22617/1178742872@github.com>

Miklós Németh

unread,
Jul 8, 2022, 5:06:19 AM7/8/22
to wx-...@googlegroups.com, Subscribed

Closed #22617 as completed.


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/22617/issue_event/6958431155@github.com>

Reply all
Reply to author
Forward
0 new messages