Author Topic: C::B svn 11029 compiles but not 11030  (Read 415 times)

Offline gd_on

  • Regular
  • ***
  • Posts: 370
C::B svn 11029 compiles but not 11030
« on: March 25, 2017, 04:07:30 pm »
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.
Code: [Select]
-------------- 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
« Last Edit: March 25, 2017, 04:22:51 pm by gd_on »
Windows 10, svn C::B self generated (last version or almost!), WxWidgets 2.8.12, Compilers TDM 4.9.2 32 bits version (gcc and gfortran installed in C:\MinGW32). Tests with C::B 64 bits and WxWidgets 2.8.12 (64 bits) compiled by TDM 4.9.2 in C:\MinGW64

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9868
Re: C::B svn 11029 compiles but not 11030
« Reply #1 on: March 25, 2017, 05:04:35 pm »
Is this error happening after a full rebuild?
<debugger plugin maintainer>
(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!]

Offline Miguel Gimenez

  • Multiple posting newcomer
  • *
  • Posts: 42
Re: C::B svn 11029 compiles but not 11030
« Reply #2 on: March 25, 2017, 05:26:23 pm »
Yes, and also happens with TDM5.1

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9868
Re: C::B svn 11029 compiles but not 11030
« Reply #3 on: March 25, 2017, 06:59:35 pm »
Does nm work on windows? Can you run it on the wxpropgrid dll?
See the output for me on linux:
Code: [Select]
> 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?
<debugger plugin maintainer>
(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!]

Offline Miguel Gimenez

  • Multiple posting newcomer
  • *
  • Posts: 42
Re: C::B svn 11029 compiles but not 11030
« Reply #4 on: March 25, 2017, 07:11:25 pm »
It appears with a leading underscore

Code: [Select]
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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5701
    • My Best Post
Re: C::B svn 11029 compiles but not 11030
« Reply #5 on: March 26, 2017, 07:50:27 am »
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.
« Last Edit: March 27, 2017, 01:21:20 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline gd_on

  • Regular
  • ***
  • Posts: 370
Re: C::B svn 11029 compiles but not 11030
« Reply #6 on: March 26, 2017, 04:00:27 pm »
I was away yesterday so could not answer directly, but I agree with answers given by mgimenez.
gd_on
Windows 10, svn C::B self generated (last version or almost!), WxWidgets 2.8.12, Compilers TDM 4.9.2 32 bits version (gcc and gfortran installed in C:\MinGW32). Tests with C::B 64 bits and WxWidgets 2.8.12 (64 bits) compiled by TDM 4.9.2 in C:\MinGW64

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9868
Re: C::B svn 11029 compiles but not 11030
« Reply #7 on: March 26, 2017, 06:08:16 pm »
Can you try this patch:

Code: [Select]
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)
<debugger plugin maintainer>
(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!]

Offline Miguel Gimenez

  • Multiple posting newcomer
  • *
  • Posts: 42
Re: C::B svn 11029 compiles but not 11030
« Reply #8 on: March 26, 2017, 08:43:42 pm »
Gives redefinition error:

Code: [Select]
||=== 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)) ===|

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9868
Re: C::B svn 11029 compiles but not 11030
« Reply #9 on: March 26, 2017, 11:43:27 pm »
Should be fixed in trunk/master.
<debugger plugin maintainer>
(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!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5701
    • My Best Post
Re: C::B svn 11029 compiles but not 11030
« Reply #10 on: March 27, 2017, 01:19:33 am »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline gd_on

  • Regular
  • ***
  • Posts: 370
Re: C::B svn 11029 compiles but not 11030
« Reply #11 on: March 27, 2017, 11:41:44 am »
It looks OK, at least on Windows. ;)
Thanks all

gd_on
Windows 10, svn C::B self generated (last version or almost!), WxWidgets 2.8.12, Compilers TDM 4.9.2 32 bits version (gcc and gfortran installed in C:\MinGW32). Tests with C::B 64 bits and WxWidgets 2.8.12 (64 bits) compiled by TDM 4.9.2 in C:\MinGW64