Author Topic: Faild to build C::B with github action with latest wxWidgets 3.3.3  (Read 692 times)

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Hi, I used to use github action to build the C::B for windows under msys2/UCRT64 platform. It works OK for a long time.

Recently, I see the build error, I found that if I try to enable the "update" of the msys2 packages, then the github action get failed.
If I don't enable the update of the packages, I can build the C::B successfully, but the wxWidgets library is 3.3.2, not the latest wx 3.3.3.

Here is my github project:

https://github.com/asmwarrior/x86-codeblocks-builds

You can see the core script is this one:

https://github.com/asmwarrior/x86-codeblocks-builds/blob/main/.github/workflows/main64.yml

I tweak the yml files for a while, see the change logs of this file, and I can't solve this issue.

Any one can help? Thanks.
« Last Edit: Yesterday at 02:08:54 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I solved the problem. Both inside the yml file(see the change logs of the above file) and the C::B source code(see patch below).

Code
diff --git a/src/plugins/contrib/source_exporter/Makefile.am b/src/plugins/contrib/source_exporter/Makefile.am
index 45b3580..269670d 100644
--- a/src/plugins/contrib/source_exporter/Makefile.am
+++ b/src/plugins/contrib/source_exporter/Makefile.am
@@ -20,6 +20,8 @@ libexporter_la_LIBADD = ../../../sdk/libcodeblocks.la \
 
 if ! CODEBLOCKS_NT
 libexporter_la_LIBADD += $(CB_TINYXML_LIBS)
+else
+libexporter_la_LIBADD += -lgdi32
 endif
 
 libexporter_la_SOURCES = BaseExporter.cpp \

and

Code
diff --git a/src/plugins/contrib/debugger_gdbmi/Makefile.am b/src/plugins/contrib/debugger_gdbmi/Makefile.am
index 509b253..b3d2405 100644
--- a/src/plugins/contrib/debugger_gdbmi/Makefile.am
+++ b/src/plugins/contrib/debugger_gdbmi/Makefile.am
@@ -22,11 +22,10 @@ libdebugger_gdbmi_la_LDFLAGS = \
 
 libdebugger_gdbmi_la_LIBADD = \
  ../../../sdk/libcodeblocks.la \
- $(CB_TINYXML_LIBS) \
  $(WX_LIBS)
 
 if ! CODEBLOCKS_NT
-libdebugger_gdbmi_la_LIBADD += -lutil
+libdebugger_gdbmi_la_LIBADD += -lutil $(CB_TINYXML_LIBS)
 endif
 
 libdebugger_gdbmi_la_SOURCES = \
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.