News:

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

Main Menu

C::B svn 11029 compiles but not 11030

Started by gd_on, March 25, 2017, 04:07:30 PM

Previous topic - Next topic

gd_on

My last svn compilation was OK (svn 11029) but when I tried to update to 11033 I had problems. After some tests, it looks that the problem comes with svn 11030.
The problem appears when compiling codeblocks.exe.

-------------- Générer : src dans Code::Blocks wx2.8.x (compilateur : GNU GCC Compiler)---------------

mingw32-g++.exe -Lbase\tinyxml -LC:\wxWidgets-2.8.12\lib\gcc_dll -Ldevel -Lexchndl\win32\lib -o devel\codeblocks.exe .objs\src\app.o .objs\src\appglobals.o .objs\src\associations.o .objs\src\backtracedlg.o .objs\src\breakpointsdlg.o .objs\src\compilersettingsdlg.o .objs\src\cpuregistersdlg.o .objs\src\crashhandler.o .objs\src\debugger_interface_creator.o .objs\src\debuggermenu.o .objs\src\debuggersettingscommonpanel.o .objs\src\debuggersettingsdlg.o .objs\src\debuggersettingspanel.o .objs\src\disassemblydlg.o .objs\src\dlgabout.o .objs\src\dlgaboutplugin.o .objs\src\editkeywordsdlg.o .objs\src\editorconfigurationdlg.o .objs\src\environmentsettingsdlg.o .objs\src\examinememorydlg.o .objs\src\find_replace.o .objs\src\goto_file.o .objs\src\infopane.o .objs\src\main.o .objs\src\notebookstyles.o .objs\src\printdlg.o .objs\src\projectdepsdlg.o .objs\src\projectmanagerui.o .objs\src\projectoptionsdlg.o .objs\src\recentitemslist.o .objs\src\scriptconsole.o .objs\src\scriptingsettingsdlg.o .objs\src\splashscreen.o .objs\src\startherepage.o .objs\src\switcherdlg.o .objs\src\threadsdlg.o .objs\src\virtualbuildtargetsdlg.o .objs\src\watchesdlg.o  .objs\src\resources\resources.res -Wl,--enable-auto-import -Wl,--no-undefined  -lcodeblocks -lwxpropgrid -lexchndl -lshfolder -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwxmsw28u -mwindows
.objs\src\watchesdlg.o:watchesdlg.cpp:(.text+0x473): undefined reference to `wxString_wxPG_LABEL'
.objs\src\watchesdlg.o:watchesdlg.cpp:(.text+0x47a): undefined reference to `wxString_wxPG_LABEL'
.objs\src\watchesdlg.o:watchesdlg.cpp:(.text+0xcd2): undefined reference to `wxString_wxPG_LABEL'
.objs\src\watchesdlg.o:watchesdlg.cpp:(.text+0x2192): undefined reference to `wxString_wxPG_LABEL'
.objs\src\watchesdlg.o:watchesdlg.cpp:(.text+0x227f): undefined reference to `wxString_wxPG_LABEL'
.objs\src\watchesdlg.o:watchesdlg.cpp:(.text+0x4b4c): more undefined references to `wxString_wxPG_LABEL' follow
C:/MinGW32/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: .objs\src\watchesdlg.o: bad reloc address 0x4 in section `.data'
collect2.exe: error: ld returned 1 exit status
Le processus s'est terminé avec le code d'état 1 (0 minute(s), 4 seconde(s))
7 erreur(s), 0 avertissement(s) (0 minute(s), 4 seconde(s))


I'm on Windows 10. I compile with tdm mingw 4.9.2 (32 bits and also some tests in 64 bits). I use wxwidgets 2.8.12 compiled with the same compiler.
Apparently, something has changed and need wxString_wxPG_LABEL which was not used (?) before.

Is it a problem with my compiler version (I don't use tdm 5.1 because I have problems with gfortran 5.1) , my wxwidgets version ?
I reverted to 11029, recompiled totally to be sure, and it's OK with this version

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

oBFusCATed

Is this error happening after a full rebuild?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Miguel Gimenez


oBFusCATed

Does nm work on windows? Can you run it on the wxpropgrid dll?
See the output for me on linux:

> nm libwxpropgrid.so | grep LABEL
00000000002c3e2c B wxEVT_PG_LABEL_EDIT_BEGIN
00000000002c3e28 B wxEVT_PG_LABEL_EDIT_ENDING
00000000002c46b0 B wxString_wxPG_LABEL


If nm doesn't work can you try dependency walker tool and see if there is this symbol in dll?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Miguel Gimenez

It appears with a leading underscore

C:\trunk\src\devel>nm wxpropgrid.dll | grep LABEL
6e4e699c B _wxEVT_PG_LABEL_EDIT_BEGIN
6e4e69a0 B _wxEVT_PG_LABEL_EDIT_ENDING
6e4e651c B _wxString_wxPG_LABEL

stahta01

#5
Possible patch that needs tested on Linux and Windows using wxWidgets 2.8.12.

wxpropgrid: Backported "wxPGProperty::sm_wxPG_LABEL" from wxWidgets git master.

Too tired to test; it fixed the link error on Windows.

NOTE: I am a good C Programmer;but, still learning C++. So, needs checked for stupid C++ mistakes.

Deleted patch file.

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]

gd_on

I was away yesterday so could not answer directly, but I agree with answers given by mgimenez.
gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

oBFusCATed

Can you try this patch:


diff --git a/src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h b/src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h
index 7942fd5fd..4e54c820f 100644
--- a/src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h
+++ b/src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h
@@ -676,7 +676,7 @@ protected:
#define wxPG_EMPTY_ARRAYSTRING  wxArrayString()

#if !defined(SWIG)
-    extern wxString wxString_wxPG_LABEL;
+    WXDLLIMPEXP_PG wxString wxString_wxPG_LABEL;
     #define wxPG_LABEL              wxString_wxPG_LABEL
     #define wxPG_NULL_BITMAP        wxNullBitmap
     #define wxPG_COLOUR_BLACK       (*wxBLACK)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Miguel Gimenez

Gives redefinition error:


||=== Build: wxpropgrid in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
C:\trunk\src\sdk\wxpropgrid\src\propgrid.cpp|569|error: redefinition of 'wxString wxString_wxPG_LABEL'|
sdk\wxpropgrid\include\wx\propgrid\propgrid.h|679|error: 'wxString wxString_wxPG_LABEL' previously declared here|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 10 second(s)) ===|

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Quote from: oBFusCATed on March 26, 2017, 11:43:27 PM
Should be fixed in trunk/master.

Code::Blocks core project built using MinGW64 gcc 5.3.0 and wxWidgets 2.8.12.

It ran, but, I did no testing just openned and closed code::blocks.

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]

gd_on

It looks OK, at least on Windows. ;)
Thanks all

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).