Recent Posts

Pages: 1 2 3 4 5 6 [7] 8 9 10
61
Development / Re: build bot in the github, I see one nice project
« Last post by ollydbg on September 26, 2024, 10:11:45 am »
I searched all the usage of PLUGIN_EXPORT in our source code base, and I see the only usage of the PLUGIN_EXPORT is in the wxSmith, such as:

"class PLUGIN_EXPORT wxsAdvQPP : public wxsQuickPropsPanel"

Basically, I think the other plugin just export all the symbols of the classes and functions. While, for wxsmith, only a limited symbols will be exported (because we can only exported the symbols with "__declspec (dllexport)").

So, when you define the "EXPORT_LIB", you add the "__declspec (dllexport)" to that symbol.

But export all the symbols of the whole dll is not a good idea, because not every symbol should be exported, and the total symbols resolution take extra time for the dll loader.

If I remember correctly, under wxWidgets, the dll only export a limited number of symbols, and it also reduce the dll size.

62
Development / Re: build bot in the github, I see one nice project
« Last post by ollydbg on September 26, 2024, 07:46:59 am »
Hi, Tim, thanks.

I looked at your patches here:  https://github.com/stahta01/MINGW-packages/tree/codeblocks-git/mingw-w64-codeblocks-git

Especially this one: https://github.com/stahta01/MINGW-packages/blob/codeblocks-git/mingw-w64-codeblocks-git/007-makefile-wxsmith-plugin-export-fix.patch

I see that you have added the "EXPORT_LIB" macro definition in the Makefile.am file in the compiler option.

I think defining this has the same effect as my change of the:

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

Because defining such macro will make the "#define PLUGIN_EXPORT __declspec (dllexport)" take effect.


But, when I search the build log(the build log I have days ago) of the configure/make result. I see that when we build plugins, we don't have such "EXPORT_LIB" defined in many plugins, for example, when build the codecompletion plugin or compiler plugin, I see the log code looks like below:

Code
2024-09-24T11:47:33.4430652Z 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/scripting/include -I../../../src/include -I../../../src/sdk/wxscintilla/include -I../../../src/plugins/compilergcc/depslib/src -DDEPSLIB_WINDOWS -DCB_AUTOCONF -DPIC -O2 -ffast-math -fPIC -fexceptions -MT compilermessages.lo -MD -MP -MF .deps/compilermessages.Tpo -c compilermessages.cpp  -DDLL_EXPORT -DPIC -o .libs/compilermessages.o

or


Code
2024-09-24T12:28:29.7971808Z 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 -I../../../../src/include/tinyxml -I./src -I./src/LSPclient -I./src/codecompletion -I./src/winprocess -I./src/winprocess/asyncprocess -I./src/winprocess/misc -DCB_AUTOCONF -DPIC -O2 -ffast-math -fPIC -fexceptions -MT src/codecompletion/parser/parser.lo -MD -MP -MF src/codecompletion/parser/.deps/parser.Tpo -c src/codecompletion/parser/parser.cpp  -DDLL_EXPORT -DPIC -o src/codecompletion/parser/.libs/parser.o

You see, the "-DDLL_EXPORT -DPIC" is always defined. When I looked at the Makefile.am for those plugins, I don't see they defined the EXPORT_LIB.

So, I'm not sure why those plugins can be built with out issue.

But when I looked at the cbp files for those plugins, I see "BUILDING_PLUGIN" is always defined in the cbp, from the cbplugin.h, I see that "BUILDING_PLUGIN" means "#define PLUGIN_EXPORT __declspec (dllexport)".

So, my question is: shall we enable all "__declspec (dllexport)" if I see the "-DDLL_EXPORT"? It looks like "DLL_EXPORT" comes from the configure/auto-make world, but I can't find its source.

Thanks.







63
Using Code::Blocks / can't jump to definition of std::string_view
« Last post by mayaming on September 26, 2024, 06:55:28 am »
hi,

I'm new to code blocks. I write my first cpp console application but can't jump to declaration or implementation of std::string_view when I right click those menu items. Meanwhile, it works for std::string. Since string_view is supported since c++ 17, I'm wondering if it is because codeblock doesn't support declaration or implementation jumping for those added after c++ 17?

The "-std=c++20" option is checked in compiler settings and it could build and run correctly. My g++ version is:

g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here's the code:
Code
#include <iostream>
#include <string>
using namespace std;

int main()
{
    string s("Hello world!");
    string_view sv(s.c_str(), 5);
    cout <<sv <<endl;
    return 0;
}

Thanks!


 
64
Development / Re: build bot in the github, I see one nice project
« Last post by stahta01 on September 26, 2024, 02:26:19 am »
Found what I consider the proper fix for building wxSmith under Msys2 MinGW using configure/make.

You need to update the file "ax_cxx_compile_stdcxx.m4" using https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_cxx_compile_stdcxx.m4

Edit2: With the old ax_cxx_compile_stdcxx.m4 the wxsmith plugin was compiled using c++17 instead of c++11 which is what it should have used.
Edit5: Testing implies c++14 works; but, c++17 fails and GCC 14.x defaults to c++17.

Edit: I have not yet finished testing the building and yet to run the plugin.

Edit3: It built and the wxsmith plugin loaded without any message seen by me.

Edit4: I created an git package when I thought svn might have been the cause of the file not found bug. See https://github.com/stahta01/MINGW-packages/tree/codeblocks-git/mingw-w64-codeblocks-git

And, apply this patch.

Code
--- a/src/plugins/contrib/wxSmith/Makefile.am
+++ b/src/plugins/contrib/wxSmith/Makefile.am
@@ -7,7 +7,11 @@
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 lib_LTLIBRARIES = libwxsmithlib.la
 
-libwxsmithlib_la_LDFLAGS = -version-info 0:1:0 -shared
+libwxsmithlib_la_LDFLAGS = -version-info 0:1:0 -shared -no-undefined
 
 libwxsmithlib_la_LIBADD = ../../../sdk/libcodeblocks.la \
  properties/libwxsmith_properties.la \
--- a/src/plugins/contrib/wxSmith/properties/Makefile.am
+++ b/src/plugins/contrib/wxSmith/properties/Makefile.am
@@ -2,6 +2,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_properties.la
 
 libwxsmith_properties_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--- a/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am
@@ -2,6 +2,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets_defitems.la
 
 libwxsmith_wxwidgets_defitems_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--- a/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am
@@ -5,6 +5,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets.la
 
 libwxsmith_wxwidgets_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--- a/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am
@@ -2,6 +2,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets_properties.la
 
 libwxsmith_wxwidgets_properties_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--
65
Hello ollydbg,

I have tried -O0.

The program still does not break on if statements (or other flow control statements) and still skips assignment statements.




=thoth=

I think you may need to create a minimal program, and share it here. So others can test and reproduce it.

But from my point of view, this is mainly a compiler or debugger issue.

Posting a full bull log might show the problem.

Tim S.
66
Hello ollydbg,

I have tried -O0.

The program still does not break on if statements (or other flow control statements) and still skips assignment statements.




=thoth=

I think you may need to create a minimal program, and share it here. So others can test and reproduce it.

But from my point of view, this is mainly a compiler or debugger issue.
67
Nightly builds / The 25 September 2024 build (13571) is out.
« Last post by killerbot on September 25, 2024, 08:34:02 pm »
We switched to gcc 14.1.0 (on 20 May 2024) --> download the new wx/mingw dll's see link below

Get the compiler we use here : https://github.com/brechtsanders/winlibs_mingw/releases/download/14.1.0posix-18.1.5-11.0.1-ucrt-r1/winlibs-x86_64-posix-seh-gcc-14.1.0-mingw-w64ucrt-11.0.1-r1.7z

Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works.

A link to the unicode windows wxWidget dll(s) for Code::Blocks : https://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/wxmsw32u_gcc_cb_wx326_2D_gcc1410-mingw64.7z
A link to Mingw64 dll's needed by Code::Blocks : http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/Mingw64dlls14.1.0.7z


The 25 September 2024 build is out.
  - Windows :
   http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/2024/CB_20240925_rev13571_win64.7z
  - Linux :
   none

The current SDK version is : 2.25.0

Resolved Fixed:

  • switch to wx 3.2.6

Regressions/Confirmed/Annoying/Common bugs:


    68
    Using Code::Blocks / Re: Breakpoints Not Breaking on Flow Control or Assignment Statements
    « Last post by Thoth on September 25, 2024, 07:25:36 pm »
    Hello ollydbg,

    I have tried -O0.

    The program still does not break on if statements (or other flow control statements) and still skips assignment statements.




    =thoth=
    69
    Using Code::Blocks / Re: Update of documentation CB on Windows
    « Last post by ThierryD on September 25, 2024, 06:01:44 pm »
    Thank's much.

    Not very important, but with my test DLL into CB, I see that result "Build log" into CB is not the same that messages screened into simple CMD on Windows.
    Certains lines appears in CMD (all lines) and missed in "Build log", and sequentiality of these lines is sometimes unrespected (mixed ?) in "Build log" too.

    Sincerly.


     
    70
    Quote
    I have enabled debugging symbols and tried variations of optimizations.

    My suggestion: if you want to debug the code, it is recommended that you do not have optimization option in your compiler option, I mean -O0 option is needed.
    Pages: 1 2 3 4 5 6 [7] 8 9 10