Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

build bot in the github, I see one nice project

<< < (12/26) > >>

Grit Clef:
And in my repository, the svn revision and the wxWidgets version now can be Automatically detected.

ollydbg:

--- Quote from: Grit Clef on September 23, 2024, 05:48:09 am ---And in my repository, the svn revision and the wxWidgets version now can be Automatically detected.

--- End quote ---

Thanks for the info. My github action code for created the release package is mainly created by chatGPT, and has some flaws. I got some warning message like below:


--- Quote ---The following actions uses node12 which is deprecated and will be forced to run on node16: actions/create-release@v1, actions/upload-release-asset@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
--- End quote ---

I think I will use your method, and by adding some time stamp for the release.

Question: why do you add a cron section?


--- Code: ---  schedule:
    - cron: '0 0 7,14,21,28 * *'
--- End code ---

You want to run the github action every week? (chatGPT gives me the answer: the cron expression '0 0 7,14,21,28 * *' means that the job will run at midnight on the 7th, 14th, 21st, and 28th day of every month.)

ollydbg:

--- Quote from: Grit Clef on September 23, 2024, 05:48:09 am ---And in my repository, the svn revision and the wxWidgets version now can be Automatically detected.

--- End quote ---

You need to check this code for get the svn value string.

https://github.com/arnholm/codeblocks_sfmirror/blob/master/update_revision.sh

because if the git has some customized commits which does not contain the git-svn-id string, it will got empty result in your github action.

EDIT:

I think you could use:


--- Code: ---git log --graph | grep 'git-svn-id' | head -n 1 | grep -o -e "@\([0-9]*\)" | tr -d '@ '

--- End code ---

ollydbg:
I want to remove the hack of the dll export hack in building wxsmith plugin.


--- Code: ---# Workaround from msys2: error: definition of static data member 'wxsArrayStringEditorDlg::sm_eventTable' of dllimport'd class
# grep -rl "PLUGIN_EXPORT " src/plugins/contrib/wxSmith | xargs -i sed -i "s/PLUGIN_EXPORT //g" {}

--- End code ---

So, I remove the hack above.

Now, I see the build error.

It looks like the dll export declaration is not defined.

But when I checked the build log, I see that:


--- Code: ---2024-09-24T11:34:32.2601440Z checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
2024-09-24T11:34:32.4010899Z checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
...
...
...
2024-09-24T12:32:02.1013349Z libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -ID:/msys64/mingw64/lib/wx/include/msw-unicode-3.2 -ID:/msys64/mingw64/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -I../../../../../src/include -I../../../../../src/sdk/wxscintilla/include -DCB_AUTOCONF -DPIC -O2 -ffast-math -fPIC -fexceptions -MT wxsfloatproperty.lo -MD -MP -MF .deps/wxsfloatproperty.Tpo -c wxsfloatproperty.cpp  -DDLL_EXPORT -DPIC -o .libs/wxsfloatproperty.o
...
...
build failed!!!


--- End code ---

You see, when building every plugin, the "-DDLL_EXPORT -DPIC" is defined.

But my question is: Where is the "DLL_EXPORT" get defined? I search all the C::B code git repo, and I can't find one.

When I check the cbp files, I see there is no "DLL_EXPORT" defined, instead, in the cbp file, another macro named "BUILDING_PLUGIN", this is core point, because in the

include\cbplugin.h, note this file is included in every cpp file when you need to build a plugin.


--- Code: ---#ifdef __WXMSW__
    #ifndef PLUGIN_EXPORT
        #ifdef EXPORT_LIB
            #define PLUGIN_EXPORT __declspec (dllexport)
        #else // !EXPORT_LIB
            #ifdef BUILDING_PLUGIN
                #define PLUGIN_EXPORT __declspec (dllexport)
            #else // !BUILDING_PLUGIN
                #define PLUGIN_EXPORT __declspec (dllimport)
            #endif // BUILDING_PLUGIN
        #endif // EXPORT_LIB
    #endif // PLUGIN_EXPORT
#else
    #define PLUGIN_EXPORT
#endif
--- End code ---

So, I think we need to solve this issue.

I even checked the configure.ac file or Makefile.am file, I don't find the DLL_EXPORT definition.

Is this value a predefined string?

ollydbg:
When I looked at the link

[MinGW] make check problem Issue #9115 protocolbuffers/protobuf

or

Make commands not working on Windows 10 at setting check up Issue #297 libcheck/check

It looks like the "DLL_EXPORT" is predefined in the auto configure tool?


EDIT:

I will try this patch below in the github action.


--- Code: ---diff --git a/src/include/cbplugin.h b/src/include/cbplugin.h
index 10258e5..a3ce67b 100644
--- a/src/include/cbplugin.h
+++ b/src/include/cbplugin.h
@@ -23,11 +23,11 @@
         #ifdef EXPORT_LIB
             #define PLUGIN_EXPORT __declspec (dllexport)
         #else // !EXPORT_LIB
-            #ifdef BUILDING_PLUGIN
+            #if defined(BUILDING_PLUGIN) || defined(DLL_EXPORT)
                 #define PLUGIN_EXPORT __declspec (dllexport)
-            #else // !BUILDING_PLUGIN
+            #else // !BUILDING_PLUGIN && !DLL_EXPORT
                 #define PLUGIN_EXPORT __declspec (dllimport)
-            #endif // BUILDING_PLUGIN
+            #endif // BUILDING_PLUGIN || DLL_EXPORT
         #endif // EXPORT_LIB
     #endif // PLUGIN_EXPORT
 #else

--- End code ---



Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version