News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

codeblocks does not compile / link because of MouseEventsHandler

Started by magfan, July 28, 2025, 08:29:31 AM

Previous topic - Next topic

magfan

I downloaded the latest SVN version this morning and wanted to compile it as usual. This time, however, I received an error message:

/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: .libs/dragscroll.o: in function `cbDragScroll::Detach(wxWindow*)':
dragscroll.cpp:(.text+0x2445): undefined reference to `MouseEventsHandler::OnMouseRightDown(wxMouseEvent&)'
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: dragscroll.cpp:(.text+0x2494): undefined reference to `MouseEventsHandler::OnMouseRightUp(wxMouseEvent&)'
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: .libs/dragscroll.o: in function `cbDragScroll::Attach(wxWindow*)':
dragscroll.cpp:(.text+0x404c): undefined reference to `MouseEventsHandler::OnMouseRightDown(wxMouseEvent&)'
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: dragscroll.cpp:(.text+0x409d): undefined reference to `MouseEventsHandler::OnMouseRightUp(wxMouseEvent&)'
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: dragscroll.cpp:(.text+0x40ee): undefined reference to `MouseEventsHandler::OnMouseRightUp(wxMouseEvent&)'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:557: libdragscroll.la] Fehler 1

How can I solve this?


Miguel Gimenez

Probably related to this line in dragscroll.cpp and dragscroll.h
#if defined(__GNUG__) && !defined(__APPLE__) && !defined(__MINGW32__)
where __GNUG__ should be __GNUC__.

magfan


stahta01

The file "linux_functions.cpp" needs added to the Makefile build system.

Edit: likely to src/plugins/contrib/dragscroll/Makefile.am


C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Pecan

Quote from: stahta01 on July 29, 2025, 01:11:22 AM
The file "linux_functions.cpp" needs added to the Makefile build system.

Edit: likely to src/plugins/contrib/dragscroll/Makefile.am

Fixed svn 13682
Thanks

Miguel Gimenez


stahta01

Quote from: Miguel Gimenez on July 29, 2025, 11:01:03 AM
@pecan, is __GNUG__ correct?

__GNUG__ is correct for C++ required; __GNUC__ is correct if only C compiler is needed.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Miguel Gimenez