Problem on linking to static libraries

Erkam Murat Bozkurt <[email protected]> Wed, 17 Jun 2026 13:35:44 +0300
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CAG1x5-N30EtCuK2JPZgba0NmYpqkdX3PP8bmyqS3ST7ARVyVLA@mail.gmail.com>
--000000000000fa48090654709fce
Content-Type: text/plain; charset="UTF-8"

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

-- 
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/CAG1x5-N30EtCuK2JPZgba0NmYpqkdX3PP8bmyqS3ST7ARVyVLA%40mail.gmail.com.

--000000000000fa48090654709fce
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Currently, I am developing a fully automatic C++ build sys=
tem generator and I am performing some tests on the platform. However, when=
 I try to <br>give links to the wxWidgets libraries, it gives undefined ref=
erence to some libraries<br><br>)&#39;<br>C:/Users/ermur/mingw64/bin/../lib=
/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C=
:/pcynlitx.nova.<br>test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:73:(.text+0x=
200): undefined reference to `wxImage::AddHandler(wxImageHandler*)&#39;<br>=
C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../..=
/x86_64-w64-mingw32/bin/ld.exe: C:/pcynlitx.nova.<br>test/SOURCE/GUI.DEVELO=
PMENT/wxLauncher.cpp:87:(.text+0x329): undefined reference to `wxIcon::Copy=
FromBitmap(wxBitmap const&amp;)<br>&#39;<br>C:/Users/ermur/mingw64/bin/../l=
ib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:=
 C:/pcynlitx.nova.<br>test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:89:(.text+=
0x34f): undefined reference to `wxTopLevelWindowBase::SetIcon(wxIcon co<br>=
nst&amp;)&#39;<br>C:/Users/ermur/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/=
15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/pcynlitx.nova.<br>test=
/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:107:(.text+0x508): undefined referen=
ce to `wxIcon::~wxIcon()&#39;<br>C:/Users/ermur/mingw64/bin/../lib/gcc/x86_=
64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/pcynlit=
x.nova.<br>test/SOURCE/GUI.DEVELOPMENT/wxLauncher.cpp:107:(.text+0x59a): un=
defined reference to `wxIcon::~wxIcon()&#39;<br>C:/Users/ermur/mingw64/bin/=
../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.=
exe: wxLauncher.o: in <br>function `wxGet_wxConvLibc()&#39;:<br><br><br>I h=
ave tried to link with full library path and include configuration files ex=
isting on mswud (setup.h file for wxMsw), but I failed. <br><br>In my devel=
opment repository, I have used auto configured cmake tools with FetchConten=
t<br><br><br>include(FetchContent)<br><br>FetchContent_Declare(<br>=C2=A0 =
=C2=A0wxWidgets<br>=C2=A0 =C2=A0GIT_REPOSITORY <a href=3D"https://github.co=
m/wxWidgets/wxWidgets.git">https://github.com/wxWidgets/wxWidgets.git</a><b=
r>=C2=A0 =C2=A0GIT_TAG v3.3.1<br>=C2=A0 =C2=A0GIT_PROGRESS TRUE<br>)<br><br=
>FetchContent_GetProperties(wxwidgets)<br>FetchContent_MakeAvailable(wxwidg=
ets)<br><br>it Works without any problem. However, when I try to make direk=
t link with include and link directories, it fails. It is obvious that ther=
e is a configuration problem that I can not recognize. <br><br>I have give =
the links of the project below<br><br><a href=3D"https://github.com/Erkam-M=
urat-Bozkurt/pcynlitx.nova">https://github.com/Erkam-Murat-Bozkurt/pcynlitx=
.nova</a><br><br><a href=3D"https://www.pcynlitx.com/">https://www.pcynlitx=
.com/</a><br><br>Erkam Murat Bozkurt<br><br><br></div>

<p></p>

-- <br />
Please read <a href=3D"https://www.wxwidgets.org/support/mlhowto.htm">https=
://www.wxwidgets.org/support/mlhowto.htm</a> before posting.<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;wx-users&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">wx-users+u=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
wx-users/CAG1x5-N30EtCuK2JPZgba0NmYpqkdX3PP8bmyqS3ST7ARVyVLA%40mail.gmail.c=
om?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgi=
d/wx-users/CAG1x5-N30EtCuK2JPZgba0NmYpqkdX3PP8bmyqS3ST7ARVyVLA%40mail.gmail=
.com</a>.<br />

--000000000000fa48090654709fce--