Problem on linking to static libraries

17 views
Skip to first unread message

Erkam Murat Bozkurt

unread,
Jun 17, 2026, 10:39:10 AM (7 days ago) Jun 17
to wx-u...@googlegroups.com
Currently, I am developing a fully automatic C++ build system generator and I am performing some tests on the platform. However, when I try to
give links to the wxWidgets libraries, it gives undefined reference to some libraries

)'
C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/pcynlitx.nova.
test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:73:(.text+0x200): undefined reference to `wxImage::AddHandler(wxImageHandler*)'
C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/pcynlitx.nova.
test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:87:(.text+0x329): undefined reference to `wxIcon::CopyFromBitmap(wxBitmap const&)
'
C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/pcynlitx.nova.
test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:89:(.text+0x34f): undefined reference to `wxTopLevelWindowBase::SetIcon(wxIcon co
nst&)'
C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/pcynlitx.nova.
test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:107:(.text+0x508): undefined reference to `wxIcon::~wxIcon()'
C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/pcynlitx.nova.
test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:107:(.text+0x59a): undefined reference to `wxIcon::~wxIcon()'
C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: wxLauncher.o: in
function `wxGet_wxConvLibc()':


I have tried to link with full library path and include configuration files existing on mswud (setup.h file for wxMsw), but I failed.

In my development repository, I have used auto configured cmake tools with FetchContent


include(FetchContent)

FetchContent_Declare(
   wxWidgets
   GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
   GIT_TAG v3.3.1
   GIT_PROGRESS TRUE
)

FetchContent_GetProperties(wxwidgets)
FetchContent_MakeAvailable(wxwidgets)

it Works without any problem. However, when I try to make direkt link with include and link directories, it fails. It is obvious that there is a configuration problem that I can not recognize.

I have give the links of the project below

https://github.com/Erkam-Murat-Bozkurt/pcynlitx.nova

https://www.pcynlitx.com/

Erkam Murat Bozkurt


Vadim Zeitlin

unread,
Jun 17, 2026, 10:43:15 AM (7 days ago) Jun 17
to wx-u...@googlegroups.com
On Wed, 17 Jun 2026 13:35:44 +0300 Erkam Murat Bozkurt wrote:

EMB> Currently, I am developing a fully automatic C++ build system generator and
EMB> I am performing some tests on the platform. However, when I try to
EMB> give links to the wxWidgets libraries, it gives undefined reference to some
EMB> libraries

You need to give at least some details about what you're doing, e.g.

1. How do you build wxWidgets: static or shared libraries?
2. How do you link with it, e.g. maybe the link command.

Without this it's highly unlikely that anybody will be able to answer your
question. My only idea is that you use static libraries and don't put them
in the right order, but it's a total shot in the dark.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/

Sean Tolstoyevski

unread,
Jun 17, 2026, 5:17:34 PM (7 days ago) Jun 17
to wx-u...@googlegroups.com
why dont use vcpkg or mainstream package manager? 


On 17 Jun 2026, at 17:39, Erkam Murat Bozkurt <er.mura...@gmail.com> wrote:


--
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
---
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-users/CAG1x5-N30EtCuK2JPZgba0NmYpqkdX3PP8bmyqS3ST7ARVyVLA%40mail.gmail.com.

Igor Korot

unread,
Jun 17, 2026, 5:32:43 PM (7 days ago) Jun 17
to wx-u...@googlegroups.com
Or even use CMake directly?

Thank you.
> To view this discussion visit https://groups.google.com/d/msgid/wx-users/24E3FD0A-344E-48B8-B795-FF78B4C4CB1B%40gmail.com.
Reply all
Reply to author
Forward
0 new messages