Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: stahta01 on July 27, 2015, 03:25:24 am

Title: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on July 27, 2015, 03:25:24 am
Code: [Select]
Index: src/CodeBlocks.cbp
===================================================================
--- src/CodeBlocks.cbp  (revision 10372)
+++ src/CodeBlocks.cbp  (working copy)
@@ -218,7 +218,7 @@
                                        <Add library="advapi32" />
                                        <Add library="wsock32" />
                                        <Add directory="devel" />
-                                       <Add directory="exchndl/win32/lib" />
+                                       <Add directory="exchndl/win32/bin" />
                                </Linker>
                                <ExtraCommands>
                                        <Add after="cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks" />

Tim S.

Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on July 27, 2015, 08:00:41 am
Code: [Select]
Index: src/CodeBlocks.cbp
===================================================================
--- src/CodeBlocks.cbp  (revision 10372)
+++ src/CodeBlocks.cbp  (working copy)
@@ -218,7 +218,7 @@
                                        <Add library="advapi32" />
                                        <Add library="wsock32" />
                                        <Add directory="devel" />
-                                       <Add directory="exchndl/win32/lib" />
+                                       <Add directory="exchndl/win32/bin" />
                                </Linker>
                                <ExtraCommands>
                                        <Add after="cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks" />

Tim S.
Sorry, these files were hidden on commit - I've added the right ones, now.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on July 27, 2015, 08:18:29 am
Sorry, these files were hidden on commit - I've added the right ones, now.

Thank you.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on July 27, 2015, 08:21:42 am
Sorry, these files were hidden on commit - I've added the right ones, now.

Thank you.

Tim S.

This warning did NOT go way. I was thinking it happened because I linked to a DLL instead of import lib.
But, I must have been wrong.

Edit: Using TDM MinGW GCC 4.7.?

Code: [Select]
Linking executable: devel\codeblocks.exe
Warning: resolving [email protected] by linking to _ExcHndlInit
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on July 27, 2015, 07:55:12 pm
Are you sure you're removed the bin folder and re-added the lib one?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on July 27, 2015, 09:06:44 pm
Are you sure you're removed the bin folder and re-added the lib one?

Yes.
What compiler version are you using?

I will try a fresh checkout later to be sure something else is NOT causing the message.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on July 27, 2015, 09:07:46 pm
Are you sure you're removed the bin folder and re-added the lib one?

Yes.
What compiler version are you using?

I will try a fresh checkout later to be sure something else is NOT causing the message.

Tim S.
I am using tdm version 4.9.2.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on July 29, 2015, 03:05:54 am
I get a build error when building the latest svn under mingw-build gcc 4.9.2 (32bit).
Code: [Select]
[100.0%] g++.exe -Lbase\tinyxml -LE:\code\wx-mingw-build-481-dw2\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\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\app.o: In function `ZN13CodeBlocksApp20InitExceptionHandlerEv':
F:\cb_sf_git\trunk\src/src/app.cpp:459: undefined reference to `[email protected]
'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (3 minute(s), 14 second(s))
2 error(s), 0 warning(s) (3 minute(s), 14 second(s))


So, I will try to use tim's patch to see whether it fix this issue.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on July 29, 2015, 03:11:39 am
I get a build error when building the latest svn under mingw-build gcc 4.9.2 (32bit).
Code: [Select]
[100.0%] g++.exe -Lbase\tinyxml -LE:\code\wx-mingw-build-481-dw2\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\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\app.o: In function `ZN13CodeBlocksApp20InitExceptionHandlerEv':
F:\cb_sf_git\trunk\src/src/app.cpp:459: undefined reference to `[email protected]
'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (3 minute(s), 14 second(s))
2 error(s), 0 warning(s) (3 minute(s), 14 second(s))


So, I will try to use tim's patch to see whether it fix this issue.

Justed tried, but still the build error:
Code: [Select]
-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[100.0%] g++.exe -Lbase\tinyxml -LE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\lib\gcc_dll -Ldevel -Lexchndl\win32\bin -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\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\app.o: In function `ZN13CodeBlocksApp20InitExceptionHandlerEv':
F:\cb_sf_git\trunk\src/src/app.cpp:459: undefined reference to `[email protected]'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 15 second(s))
2 error(s), 0 warning(s) (0 minute(s), 15 second(s))

Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on July 29, 2015, 03:44:45 am
Code: [Select]

F:\cb_sf_git\trunk\src\exchndl\win32\lib>nm libexchndl.a

dhczt.o:
00000000 b .bss
00000000 d .data
00000000 i .idata$4
00000000 i .idata$5
00000000 i .idata$7
00000000 t .text
00000000 I ___home_travis_build_jrfonseca_drmingw_build_lib_libexchndl_a_iname

dhczh.o:
00000000 b .bss
00000000 d .data
00000000 i .idata$2
00000000 i .idata$4
00000000 i .idata$5
00000000 t .text
         U ___home_travis_build_jrfonseca_drmingw_build_lib_libexchndl_a_iname
00000000 I __head__home_travis_build_jrfonseca_drmingw_build_lib_libexchndl_a
00000000 i fthunk
00000000 i hname

dhczs00001.o:
00000000 b .bss
00000000 d .data
00000000 i .idata$4
00000000 i .idata$5
00000000 i .idata$6
00000000 i .idata$7
00000000 t .text
         U __head__home_travis_build_jrfonseca_drmingw_build_lib_libexchndl_a
00000000 I [email protected]
00000000 T [email protected]

dhczs00000.o:
00000000 b .bss
00000000 d .data
00000000 i .idata$4
00000000 i .idata$5
00000000 i .idata$6
00000000 i .idata$7
00000000 t .text
         U __head__home_travis_build_jrfonseca_drmingw_build_lib_libexchndl_a
00000000 I [email protected]
00000000 T [email protected]


Well, I do see the symbol named "[email protected]" when using the nm command.

Also, I see that in the dll, there is a function named "ExcHndInit", see the image shot below from the dependency walker:
(http://imagizer.imageshack.us/v2/907x558q90/661/Qj8Gbu.png)

But why the linker can't find it, they have different symbol names, can I add some name alise?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on July 29, 2015, 04:57:59 am
I did a fresh checkout and the warnings went away for me.

Edit: I do a fresh checkout in a non-standard way because of my slow internet connection.
I delete everything in my CB folder except the .svn folder.
Then, I do this command three times till nothing is updated on the third time.
Code: [Select]
svn update .

It normally errors out on the first time done.
Updates the external stuff on the second time.
And, on the third time it just displays the svn revs.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on July 29, 2015, 05:28:11 am
Good to know its solved for you.it could also have been that you seem to use the dwarf version which I don't. At least I didn't even try of the lib is actually compatible.it claims to bee so...
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on July 29, 2015, 05:44:42 am
Good to know its solved for you.it could also have been that you seem to use the dwarf version which I don't. At least I didn't even try of the lib is actually compatible.it claims to bee so...

I use SJLJ; but, maybe ollydbg uses dwarf version.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on July 29, 2015, 06:02:57 am
Good to know its solved for you.it could also have been that you seem to use the dwarf version which I don't. At least I didn't even try of the lib is actually compatible.it claims to bee so...

I use SJLJ; but, maybe ollydbg uses dwarf version.

Tim S.
Yes, I use dwarf version, is that the reason I get link error, I don't think so, I see exchndl is a pure C library.
BTW: I use the version: MinGW-W64 project, mingw-build i686-4.9.2-posix-dwarf-rt_v4-rev2
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on July 29, 2015, 06:55:14 am
Good to know its solved for you.it could also have been that you seem to use the dwarf version which I don't. At least I didn't even try of the lib is actually compatible.it claims to bee so...

I use SJLJ; but, maybe ollydbg uses dwarf version.

Tim S.
Yes, I use dwarf version, is that the reason I get link error, I don't think so, I see exchndl is a pure C library.
BTW: I use the version: MinGW-W64 project, mingw-build i686-4.9.2-posix-dwarf-rt_v4-rev2
ok,I think you should do a recompile and look for old versions of the dll in the path.the linker would pick an old version. Please search for exchndl.* in the path. There is no reason why it should not work except the linker picks a wrong version. You could also add the lib with the full path temporarily to try...
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on July 29, 2015, 07:09:27 am
Good to know its solved for you.it could also have been that you seem to use the dwarf version which I don't. At least I didn't even try of the lib is actually compatible.it claims to bee so...

I use SJLJ; but, maybe ollydbg uses dwarf version.

Tim S.
Yes, I use dwarf version, is that the reason I get link error, I don't think so, I see exchndl is a pure C library.
BTW: I use the version: MinGW-W64 project, mingw-build i686-4.9.2-posix-dwarf-rt_v4-rev2
ok,I think you should do a recompile and look for old versions of the dll in the path.the linker would pick an old version. Please search for exchndl.* in the path. There is no reason why it should not work except the linker picks a wrong version. You could also add the lib with the full path temporarily to try...
Hi, Morten, thanks, this issue is fixed now. I noticed that there are old exchndl.dll in the folder:
F:\cb_sf_git\trunk\src\devel
And we have the "-Ldevel -Lexchndl\win32\lib" option in the linker option, which means the "devel" folder was searched before the "exchndl/win32/lib", thus the old exchndl.dll is used in the linker. After delete the exchndl.dll in devel folder, I have successfully build the scr now.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on August 09, 2015, 10:02:27 am
Code: [Select]
Linking executable: devel\codeblocks.exe
Warning: resolving [email protected] by linking to _ExcHndlInit
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups

Tim S.
I also have this issue, this is because the linker try to link the exchndl.dll in your devel folder.(this dll will copied to your devel folder when you run the update.bat)

Here is my test: If you remove the exchndl.dll from the devel folder, than you get the good result:

Code: [Select]
-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[ 50.0%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\include -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -c src\app.cpp -o .objs\src\app.o
[100.0%] g++.exe -Lbase\tinyxml -LE:\code\wx-mingw-build-481-dw2\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\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
Output file is devel\codeblocks.exe with size 13.82 MB
[ 25.0%] Running target post-build steps
[ 50.0%] cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
[ 75.0%] zip -jq9 devel\share\CodeBlocks\resources.zip src\resources\*.xrc
[100.0%] zip -jq9 devel\share\CodeBlocks\start_here.zip src\resources\start_here\*.html src\resources\start_here\*.png
cmd /c "cd src\resources & zip -0 -q ..\..\devel\share\CodeBlocks\resources.zip images\*.png images\16x16\*.png"
Process terminated with status 0 (0 minute(s), 8 second(s))
0 error(s), 0 warning(s) (0 minute(s), 8 second(s))

So, my suggest is that we can search the -Lexchndl\win32\lib before the -Ldevel.

Here is the result, looks good even you have exchndl.dll in your devel folder.

Code: [Select]
-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[ 50.0%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\include -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -c src\app.cpp -o .objs\src\app.o
[100.0%] g++.exe -Lbase\tinyxml -LE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\lib\gcc_dll -Lexchndl\win32\lib -Ldevel -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\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
Output file is devel\codeblocks.exe with size 13.82 MB
[ 25.0%] Running target post-build steps
[ 50.0%] cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
[ 75.0%] zip -jq9 devel\share\CodeBlocks\resources.zip src\resources\*.xrc
[100.0%] zip -jq9 devel\share\CodeBlocks\start_here.zip src\resources\start_here\*.html src\resources\start_here\*.png
cmd /c "cd src\resources & zip -0 -q ..\..\devel\share\CodeBlocks\resources.zip images\*.png images\16x16\*.png"
Process terminated with status 0 (0 minute(s), 9 second(s))
0 error(s), 0 warning(s) (0 minute(s), 9 second(s))
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 02, 2015, 12:12:35 am
I see that there is this command now in the wx30.cbp file:
Code: [Select]
cmd.exe /c if exist devel30\exchndl.dll del devel30\exchndl.dll

But how am I supposed to run cb from cb when this dll is deleted?
When I run it, windows tells me that it cannot find the exchndl.dll.
So, what am I supposed to do?

I'm running win7 64bit, 32bit tdm 5.1, wx 3.1 master branch...

BTW, cb development on windows is pretty annoying compared to the linux experience...
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on September 02, 2015, 12:34:12 am
The command was added in rev 10411.

Code: [Select]
src/CodeBlocks.cbp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/CodeBlocks.cbp b/src/CodeBlocks.cbp
index 94c335e..ae5f9ef 100644
--- a/src/CodeBlocks.cbp
+++ b/src/CodeBlocks.cbp
@@ -221,6 +221,7 @@
  <Add directory="exchndl/win32/lib" />
  </Linker>
  <ExtraCommands>
+ <Add before="cmd.exe /c if exist devel\exchndl.dll del devel\exchndl.dll" />
  <Add after="cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks" />
  <Add after="zip -jq9 devel\share\CodeBlocks\resources.zip src\resources\*.xrc" />
  <Add after="zip -jq9 devel\share\CodeBlocks\start_here.zip src\resources\start_here\*.html src\resources\start_here\*.png" />

I think to run C::B correctly, you need to run "update*.dat". In the batch file, the exchndl.dll will be copied there.

The question is: I think we don't need to delete the dll, we just need to set the lib search path priority, as I said before. This can avoid the delete/copy exchndl.dll issue.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 02, 2015, 09:58:14 pm
Well first of all olly is right, on Windows cb will not run if you don't run the update script before. Secondly the dll should not be required, if implemented correctly. If loading the dll fails it will still work just that you don't have the debug reports.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 02, 2015, 11:27:09 pm
It doesn't work by default on my machine.
I have to remove the post build step in both wx28 and wx30 builds, otherwise it deletes it and fails to start.
And it is hard dependency and cb fails to start if it is missing.

What am I doing wrong? Should I run updata.bat after every build?
Why isn't it an automatically called?
What about debugging which always builds the source?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 03, 2015, 01:54:50 am
It doesn't work by default on my machine.
I have to remove the post build step in both wx28 and wx30 builds, otherwise it deletes it and fails to start.
And it is hard dependency and cb fails to start if it is missing.

What am I doing wrong? Should I run updata.bat after every build?
Why isn't it an automatically called?
What about debugging which always builds the source?

My guess is update.bat needs to be ran manually so you can use the CB in output to build the CB in devel folder.

FYI: I have plans to add an lib folder in addition to the devel folder which would make it easy to fix this problem without doing the deletes.
Does anyone think it a worth while idea for me to create the patch to do it to the Windows builds?

Tim S.

Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on September 03, 2015, 02:34:33 am

FYI: I have plans to add an lib folder in addition to the devel folder which would make it easy to fix this problem without doing the deletes.
Does anyone think it a worth while idea for me to create the patch to do it to the Windows builds?

Tim S.
You mean, do not put the lib files(.a files) in the devel folder? Instead put them in a separate lib folder? I totally agree, I think devel folder should only contains executables.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 03, 2015, 02:39:27 am

FYI: I have plans to add an lib folder in addition to the devel folder which would make it easy to fix this problem without doing the deletes.
Does anyone think it a worth while idea for me to create the patch to do it to the Windows builds?

Tim S.
You mean, do not put the lib files(.a files) in the devel folder? Instead put them in a separate lib folder? I totally agree, I think devel folder should only contains executables.

Correct put all the .a files in the lib folder this includes static libs and import libs.
Also, ones like tinyxml and other static libs in various sub folders.
The reason I was planning to do it; was to make it easier to delete all the .a files; because, I had weird issues that seemed to required that to fix.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 03, 2015, 08:25:03 am
What am I doing wrong? Should I run updata.bat after every build?
To beginners I would say "Yes". A more precise explanation follows below...

Why isn't it an automatically called?
Because it takes time and most of the time you don't need that.

What about debugging which always builds the source?
Again: You shouldn't rely the the presence of this DLL to be able to debug. However, for debugging you rely on update.bat being called at least once in the session to ensure resources are up-to-date. Depending on what you do (whether you change resources or not) you don't need it for a while then...
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 03, 2015, 08:46:00 am
As you know I'm not a beginner.

So what I did is:
0. install the latests tdm-32bit sjlj
1. install a night build
2. checkout the tree (new clean one)
3. build wxwidgets
4. build cb
5. run update.bat
6. change some code
7. press f9 to build and run / or press f8 to debug cb (this builds the code, because I have the option to build enabled).
8. codeblocks fails to start, because the dll is deleted and it is automatic dependency

The question is should I add step 7.1 - to be run update.bat to my workflow?

And what do you mean by:
Again: You shouldn't rely the the presence of this DLL to be able to debug.

Are you able to run freshly build cb without this dll in the path or next to the codeblocks.exe?

p.s. I've solved my problem by removing the delete prebuild commands, but this should work out of the box. This is why I'm discussing this.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: scarphin on September 03, 2015, 10:54:51 am
Although I'm testing on a 64-bit build with mingw-builds compiler, I can confirm that the exchndl.dll is required to run or debug CB. I think copying the current dll over the one in the devel folder or leaving that to update.bat should be preferred as running update.bat every time after the 'src' target is built is quite inefficient with current implementation.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 03, 2015, 11:48:48 am
OK - looks like in the end you are right. This must have been introduced with one of the latest version: In previous builds, it was really not needed and C::B just silently "disabled" the crash report.

So - my favourite fix would be to move all libs in a lib folder, as suggested here already.  This is a mess anyways. But careful! At least one library (bz2 IIRC) is used twice by plugins.

For the moment I would remove the pre-build command as you suggested. I fact I did that to make sure that an old version of the DLL is removed.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 03, 2015, 12:02:23 pm
...until the proper correction is done, an interim fix that works for me on Windows with all wx release versions is in SVN.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 03, 2015, 03:48:14 pm

So - my favourite fix would be to move all libs in a lib folder, as suggested here already.  This is a mess anyways. But careful! At least one library (bz2 IIRC) is used twice by plugins.


The lib name is different; likely to avoid this issue (IIRC, The help and devpak plugins are the ones.)

My long term fix used 3 local CB project custom vars of
CB_LIB poniting to lib folder
CB_BIN pointing to devel folder
CB_OBJ pointing to .objs folder

The reasons for the three CB custom vars are multiple of the build changes I want are easier if they exist.

@MortenMacFly: Would you test a Windows patch if I created it using these three custom vars?

If yes, I will start work on it once more.

Tim S.

Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 04, 2015, 07:53:08 am
I'm not sure if I like the Idea of custom vars. Because its quite hard to maintain if you think about all the project files. Often it is easier for a new compiler to either create a new target (based on an existing) within a project or simply add another project.

In the first place I though about relative paths just as we do it with the "devel" directory...
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 04, 2015, 01:59:09 pm
I'm not sure if I like the Idea of custom vars. Because its quite hard to maintain if you think about all the project files. Often it is easier for a new compiler to either create a new target (based on an existing) within a project or simply add another project.

In the first place I though about relative paths just as we do it with the "devel" directory...

But, think of how much easier it is to switch to a new version of wxWidgets by just editing the three custom vars.

Will post my two sets of patches doing it my way if after you see the way I do it you still wish me to do it without CB custom vars I will remove them.

Patch 0001 just is doing a save-as using CB 13.12 to make it easier to see the real changes in patch 0002.
Turned out I only needed to change about dozen projects of the main Windows 32bit wx2.8 projects.

Edit: I am going to start work on removing the CB custom vars in a short while.
Will post a second patch 0002 in a few hours.

Edit: Deleted attachments; will post new message with updated attachments later today.

Tim S.

Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: scarphin on September 04, 2015, 02:55:55 pm
But, think of how much easier it is to switch to a new version of wxWidgets by just editing the three custom vars.
I don't understand this. wx2.8 and wx3.0 already have separate project files and separate output/intermediate folders. Switching to a minor version like say wx3.0 -> wx3.1 is as easy as modifying the associated global variable. Or am I missing something?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on September 04, 2015, 02:57:39 pm
Hi, Tim, I see in the 0001 patch, there are some code snippet
Code: [Select]
diff --git a/src/plugins/contrib/help_plugin/help-plugin.cbp b/src/plugins/contrib/help_plugin/help-plugin.cbp
index bc3500f..7015570 100644
--- a/src/plugins/contrib/help_plugin/help-plugin.cbp
+++ b/src/plugins/contrib/help_plugin/help-plugin.cbp
@@ -64,8 +64,8 @@
  </Compiler>
  <Linker>
  <Add option="-mthreads" />
- <Add library="bzip2/libbzip2.a" />
- <Add library="zlib/libz.a" />
+ <Add library="bzip2\libbzip2.a" />
+ <Add library="zlib\libz.a" />
  </Linker>
  <ExtraCommands>
  <Add after="zip -j9 ..\..\..\devel\share\CodeBlocks\help_plugin.zip manifest.xml *.xrc *.png" />
Is that correct? change the "/" to "\" ?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 04, 2015, 06:23:38 pm
Hi, Tim, I see in the 0001 patch, there are some code snippet
Code: [Select]
diff --git a/src/plugins/contrib/help_plugin/help-plugin.cbp b/src/plugins/contrib/help_plugin/help-plugin.cbp
index bc3500f..7015570 100644
--- a/src/plugins/contrib/help_plugin/help-plugin.cbp
+++ b/src/plugins/contrib/help_plugin/help-plugin.cbp
@@ -64,8 +64,8 @@
  </Compiler>
  <Linker>
  <Add option="-mthreads" />
- <Add library="bzip2/libbzip2.a" />
- <Add library="zlib/libz.a" />
+ <Add library="bzip2\libbzip2.a" />
+ <Add library="zlib\libz.a" />
  </Linker>
  <ExtraCommands>
  <Add after="zip -j9 ..\..\..\devel\share\CodeBlocks\help_plugin.zip manifest.xml *.xrc *.png" />
Is that correct? change the "/" to "\" ?

Correct, I change nothing myself all I did was do a save-as for each project using CB 13.12.
This way the real changes are all in the second patch.

Otherwise it is real hard to see all the real changes in the same diff with the project formatting changes.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 04, 2015, 06:28:02 pm
But, think of how much easier it is to switch to a new version of wxWidgets by just editing the three custom vars.
I don't understand this. wx2.8 and wx3.0 already have separate project files and separate output/intermediate folders. Switching to a minor version like say wx3.0 -> wx3.1 is as easy as modifying the associated global variable. Or am I missing something?

No, you are NOT missing anything; what you stated is clearer than what I said.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: scarphin on September 04, 2015, 08:42:05 pm
But, think of how much easier it is to switch to a new version of wxWidgets by just editing the three custom vars.
I don't understand this. wx2.8 and wx3.0 already have separate project files and separate output/intermediate folders. Switching to a minor version like say wx3.0 -> wx3.1 is as easy as modifying the associated global variable. Or am I missing something?
Well, this is the current implementation already, I wasn't referring to your patch if that's what you thought. Is your patch trying to further separate the output/intermediate folders for minor versions (i.e. wx3.0, wx3.1)? If yes, I don't think that's a good idea because then the 'update.bat's scattered all along the project and the plugins need to be modified or duplicated per minor revisions as they will ALSO be dependent on these 3 variables. I think that is very error prone.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 05, 2015, 01:55:35 am
But, think of how much easier it is to switch to a new version of wxWidgets by just editing the three custom vars.
I don't understand this. wx2.8 and wx3.0 already have separate project files and separate output/intermediate folders. Switching to a minor version like say wx3.0 -> wx3.1 is as easy as modifying the associated global variable. Or am I missing something?
Well, this is the current implementation already, I wasn't referring to your patch if that's what you thought. Is your patch trying to further separate the output/intermediate folders for minor versions (i.e. wx3.0, wx3.1)? If yes, I don't think that's a good idea because then the 'update.bat's scattered all along the project and the plugins need to be modified or duplicated per minor revisions as they will ALSO be dependent on these 3 variables. I think that is very error prone.

So, I guess you are for code duplication?

Because, having to change 10 places is worse than changing one place per CB project in my book.

Edit: Re-reading your post it appears to me that you never looked at my second patch; I suggest you look at it before deciding what it is doing or NOT doing!

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 05, 2015, 02:08:14 am
Patch 2 and 3 that adds lib without using CB custom vars.

Patch 0003 is needed to remove an external dependency warning.

Edit: Deleted attachments; will post new message with updated attachments later today.

Tim S.


Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: scarphin on September 05, 2015, 09:09:23 am
Edit: Re-reading your post it appears to me that you never looked at my second patch; I suggest you look at it before deciding what it is doing or NOT doing!
I've looked at your 2nd patch before I posted, in fact the only download your 2nd patch has is by me. A first glance tells me it replaces the devel and obj folders with cv_bin and cb_obj variables and introduces a cb_lib variable. Now my point is if one changes the output (cb_bin) variable to, say 'output31' in accordance with wx3.1 then the update files for project, codesnippets, doxyblocks, fortran, incrementalsearch, lib_finder etc... all need to be modified to take into account this change. Am I wrong?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 05, 2015, 04:11:59 pm
Edit: Re-reading your post it appears to me that you never looked at my second patch; I suggest you look at it before deciding what it is doing or NOT doing!
I've looked at your 2nd patch before I posted, in fact the only download your 2nd patch has is by me. A first glance tells me it replaces the devel and obj folders with cv_bin and cb_obj variables and introduces a cb_lib variable. Now my point is if one changes the output (cb_bin) variable to, say 'output31' in accordance with wx3.1 then the update files for project, codesnippets, doxyblocks, fortran, incrementalsearch, lib_finder etc... all need to be modified to take into account this change. Am I wrong?

In theory you are right; but, my long term plan is to remove all update scripts except for the main one that copies from devel to output.
Also, plan to remove from CB projects the use of directly copying files to the output folders.
My plan is also to fix the building using a PCH version of sdk.h for all contrib projects using the cb_obj variable.
Currently non of the contrib projects use the precompiled version of sdk.h!

Tim S.


Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: scarphin on September 05, 2015, 05:37:38 pm
Ok now it's clear. I still think introducing variables for output/intermediate folders is not a good idea because of the main update script but a separate lib folder sounds good.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 05, 2015, 06:35:52 pm
Ok now it's clear. I still think introducing variables for output/intermediate folders is not a good idea because of the main update script but a separate lib folder sounds good.

I am starting work on adding the lib30 folder to the wx30 CB projects.
Next, will be adding lib30_64 folder.
Last, I will work on adding lib and lib30 to the Linux CB Projects.
All of the work will be without using new CB custom vars; since at least two devs are against that for some reason I fail to follow.

Edit: Feedback wanted a single big patch or as I think best two patches one with the CB reformatting and the second with the real change?

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 05, 2015, 09:15:42 pm
Last, I will work on adding lib and lib30 to the Linux CB Projects.
Why is this needed there or even on windows?
What libs do you plan to put there?
Why are we using import libs at all (.lib next to .dll) on windows?
As far as I know gcc can link directly to a dll file as on unix.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 06, 2015, 03:08:05 am
Last, I will work on adding lib and lib30 to the Linux CB Projects.
Why is this needed there or even on windows?
What libs do you plan to put there?
Why are we using import libs at all (.lib next to .dll) on windows?
As far as I know gcc can link directly to a dll file as on unix.

Linux still has the static libs.

Windows needs the import libs sometimes in this thread it needs them for the exchndl dll because linking directly gives a warning for me and an error for someone else.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on September 06, 2015, 03:09:33 am
Ok now it's clear. I still think introducing variables for output/intermediate folders is not a good idea because of the main update script but a separate lib folder sounds good.

I am starting work on adding the lib30 folder to the wx30 CB projects.
Next, will be adding lib30_64 folder.
Last, I will work on adding lib and lib30 to the Linux CB Projects.
All of the work will be without using new CB custom vars; since at least two devs are against that for some reason I fail to follow.

Edit: Feedback wanted a single big patch or as I think best two patches one with the CB reformatting and the second with the real change?

Tim S.
Here is my point:
1, I'm OK with the 0001.patch(also, I prefer the two patches version, a single big patch is too bad), which is a obvious patch
2, about your 0002 patch. Put all the libs in a single folder is a good idea. I see two versions: one version you use CB_BIN, CB_LIB, CB_OBJ, the other one version you just use the relative paths.  I prefer the first version, because, if we use CB_XXX variable in both "codeblocks.cbp", and "codeblocks_wx30.cbp" and ""codeblocks_wx30_64.cbp", then those three cpb files looks much the same. Since in many cases, only the CB_XXX are different.
3, about the update*.bat, I think we can create a "target" in the cbp which do the job, manually run them is not quite good idea.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 06, 2015, 03:24:00 am
Ok now it's clear. I still think introducing variables for output/intermediate folders is not a good idea because of the main update script but a separate lib folder sounds good.

I am starting work on adding the lib30 folder to the wx30 CB projects.
Next, will be adding lib30_64 folder.
Last, I will work on adding lib and lib30 to the Linux CB Projects.
All of the work will be without using new CB custom vars; since at least two devs are against that for some reason I fail to follow.

Edit: Feedback wanted a single big patch or as I think best two patches one with the CB reformatting and the second with the real change?

Tim S.
Here is my point:
1, I'm OK with the 0001.patch(also, I prefer the two patches version, a single big patch is too bad), which is a obvious patch
2, about your 0002 patch. Put all the libs in a single folder is a good idea. I see two versions: one version you use CB_BIN, CB_LIB, CB_OBJ, the other one version you just use the relative paths.  I prefer the first version, because, if we use CB_XXX variable in both "codeblocks.cbp", and "codeblocks_wx30.cbp" and ""codeblocks_wx30_64.cbp", then those three cpb files looks much the same. Since in many cases, only the CB_XXX are different.
3, about the update*.bat, I think we can create a "target" in the cbp which do the job, manually run them is not quite good idea.

I agree that CB_XXX variable version is better; but, others do NOT agree.
I plan to finish completely the patch without using CB_XXX variables.
And, I will then create a new patch for myself that uses CB_XXX variables.
I will post a link to it; and you can feel free to try to get it applied upstream.

I think just getting the lib,lib30, and lib30_64 patch(es) applied is all I feel up to making the effort to get applied to SVN.

Point 3. I think having a single manually called batch file per project group to copy files from devel* to output* is better than having a target in the CB project call batch files. Project group means like the Windows_32bit_wx28, Windows_32bit_wx30, and Windows_64bit_wx30.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 07, 2015, 02:00:48 pm
Found that my add lib patches was NOT needed to remove the warning and likely not needed to remove the build error.

I needed to move "exchndl/win32/lib" before "devel" in the linker search and deleted the src target pre-build step file deletion.
And, my warning went away.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 07, 2015, 02:04:41 pm
The lib folder structure in code tags below
I added folders for the static libs and removed lib name suffixes of 30, 64, or 30_64.

Code: [Select]
lib
|-- base
|   `-- libtxml.a
|-- libcodeblocks.a
|-- libwxchartctrl.a
|-- libwxcustombutton.a
|-- libwxflatnotebook.a
|-- libwximagepanel.a
|-- libwxkwic.a
|-- libwxled.a
|-- libwxpropgrid.a
|-- libwxsmithlib.a
|-- libwxspeedbutton.a
|-- libwxtreelist.a
|-- plugins
|   |-- compilergcc
|   |   `-- libdepslib.a
|   `-- contrib
|       |-- SpellChecker
|       |   |-- libhunspell.a
|       |   `-- libwxSpellChecker.a
|       |-- devpak_plugin
|       |   `-- libbz2.a
|       |-- help_plugin
|       |   |-- libbzip2.a
|       |   `-- libz.a
|       |-- source_exporter
|       |   `-- libwxPdfDocument.a
|       `-- wxSmithPlot
|           `-- libMathPlot.a
`-- sdk
    |-- libsqplus.a
    |-- libsqstdlib.a
    |-- libsquirrel.a
    `-- libwxscintilla_cb.a

10 directories, 24 files


lib30
|-- base
|   `-- libtxml.a
|-- libcodeblocks.a
|-- libwxchartctrl.a
|-- libwxcustombutton.a
|-- libwxflatnotebook.a
|-- libwximagepanel.a
|-- libwxkwic.a
|-- libwxled.a
|-- libwxsmithlib.a
|-- libwxspeedbutton.a
|-- plugins
|   |-- compilergcc
|   |   `-- libdepslib.a
|   `-- contrib
|       |-- SpellChecker
|       |   |-- libhunspell.a
|       |   `-- libwxSpellChecker.a
|       |-- devpak_plugin
|       |   `-- libbz2.a
|       |-- help_plugin
|       |   |-- libbzip2.a
|       |   `-- libz.a
|       `-- source_exporter
|           `-- libwxPdfDocument.a
`-- sdk
    |-- libsqplus.a
    |-- libsqstdlib.a
    |-- libsquirrel.a
    `-- libwxscintilla_cb.a

9 directories, 21 files


lib30_64
|-- base
|   `-- libtxml.a
|-- libcodeblocks.a
|-- libwxchartctrl.a
|-- libwxcustombutton.a
|-- libwxflatnotebook.a
|-- libwximagepanel.a
|-- libwxkwic.a
|-- libwxled.a
|-- libwxsmithlib.a
|-- libwxspeedbutton.a
|-- plugins
|   |-- compilergcc
|   |   `-- libdepslib.a
|   `-- contrib
|       |-- SpellChecker
|       |   |-- libhunspell.a
|       |   `-- libwxSpellChecker.a
|       |-- devpak_plugin
|       |   `-- libbz2.a
|       |-- help_plugin
|       |   |-- libbzip2.a
|       |   `-- libz.a
|       `-- source_exporter
|           `-- libwxPdfDocument.a
`-- sdk
    |-- libsqplus.a
    |-- libsqstdlib.a
    |-- libsquirrel.a
    `-- libwxscintilla_cb.a

9 directories, 21 files
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 07, 2015, 02:12:43 pm
Updated patches; I am still testing these patches.
My windows 64 bit computer over heated last night; so, I really need to at least test 64 bit version.

And, I plan to do a full rebuild of all three groups of patches.
(three groups: Windows 32bit wx2.8, Windows 32bit wx3.0, Windows 64bit wx3.0)

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: ollydbg on September 07, 2015, 03:16:19 pm
Found that my add lib patches was NOT needed to remove the warning and likely not needed to remove the build error.

I needed to move "exchndl/win32/lib" before "devel" in the linker search and deleted the src target pre-build step file deletion.
And, my warning went away.

Tim S.
I already states this idea, see: Re: exchndl related patch because win32/lib folder is empty in SVN (http://forums.codeblocks.org/index.php/topic,20459.msg139415.html#msg139415), but no one response to my idea.  :(
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 07, 2015, 03:56:02 pm
I added folders for the static libs and removed lib name suffixes of 30, 64, or 30_64.
Why did you remove the post-fixes? They are required as wx30 cannot be mixed with wx28 libs and 32 bits cannot be mixed with 64 bits...?!
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 07, 2015, 03:56:59 pm
I already states this idea, see: Re: exchndl related patch because win32/lib folder is empty in SVN (http://forums.codeblocks.org/index.php/topic,20459.msg139415.html#msg139415), but no one response to my idea.  :(
You could have done this directly... ;-)
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 07, 2015, 09:04:44 pm
Also do we need to have such complex file structure in the libs folder?
Why don't you flatten or at least group libs by purpose - sdk and plugins for example.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 07, 2015, 11:49:49 pm
I added folders for the static libs and removed lib name suffixes of 30, 64, or 30_64.
Why did you remove the post-fixes? They are required as wx30 cannot be mixed with wx28 libs and 32 bits cannot be mixed with 64 bits...?!

I thought being in separate folders would be enough; if you wish I can add the suffixes back.
Do you wish me to to that?

Tim S.
 
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 07, 2015, 11:55:20 pm
Also do we need to have such complex file structure in the libs folder?
Why don't you flatten or at least group libs by purpose - sdk and plugins for example.

I can flatten if you want me to; but, it seemed safer to keep them in separate folders.

Will the folders base, sdk, and plugins be OK with you?
The ones in the SDK folder should only be used to make the SDK and its supporting libs.
While base seems to be used by sdk, plugins, and tools.
So, I can tinyxml in plugins or I can have it in the base folder.

So, would you want a base folder or not?

Edit: Other option is just to keep the sdk folder and the rest in the lib folder without a sub-folder.
Too many plugins where using the SDK libs my mistake for me to remove the SDK sub-folder.

Tim S.

Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 08, 2015, 12:02:57 am
Also do we need to have such complex file structure in the libs folder?
Why don't you flatten or at least group libs by purpose - sdk and plugins for example.

I can flatten if you want me to; but, it seemed safer to keep them in separate folders.

Will the folders base, sdk, and plugins be OK with you?
The ones in the SDK folder should only be used to make the SDK and its supporting libs.
While base seems to be used by sdk, plugins, and tools.
So, I can tinyxml in plugins or I can have it in the base folder.

So, would you want a base folder or not?

Edit: Other option is just to keep the sdk folder and the rest in the lib folder without a sub-folder.
Too many plugins where using the SDK libs my mistake for me to remove the SDK sub-folder.

Tim S.

I have decided to finish testing the patches for windows one last time on Windows 64 bit.
And, then to change the lib layout to use the SDK sub-folder only. And, to start testing my patches that way.
I will also likely add back the libname suffix (of 30/64) at the same time.
Will likely take a while for me to do these changes.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 08, 2015, 12:05:13 am
If I were you I'd either do one of
1. sdk (where all libs needed by plugins are placed) and plugins (where libs needed by some plugins are placed).
2. place all libs in a single folder
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 08, 2015, 12:09:17 am
If I were you I'd either do one of
1. sdk (where all libs needed by plugins are placed) and plugins (where libs needed by some plugins are placed).
2. place all libs in a single folder

How to keep the plugins from linking to libs that they should NOT link to in that layout?
There was one or more plugins linking or depending on wxscintilla_cb in my patch that was found because of the sub-folder SDK that was needed only by the SDK.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 08, 2015, 12:20:42 am
By inspecting the build log?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 08, 2015, 12:38:20 am
By inspecting the build log?

That a lot of work for very little gain.

I will let you all to continue to waste time that way if you wish.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 08, 2015, 08:22:29 am
I thought being in separate folders would be enough; if you wish I can add the suffixes back.
Do you wish me to to that?
Oh - maybe I misunderstood the folder structure then. If they are in separate folders it would be fine... Maybe I should apply the interim patch and see myself. I just waited because you said there would be an update...
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 08, 2015, 08:25:15 am
Also do we need to have such complex file structure in the libs folder?
Why don't you flatten or at least group libs by purpose - sdk and plugins for example.
I can flatten if you want me to; but, it seemed safer to keep them in separate folders.
I don't know if complete flattening is good. Third party libs may be needed in different versions (as the bzip lib, for example). So if the folders are "too flat" you would probably overwrite a library with a wrong version which is bad. Every target (being plugin or SDK) should have an own folder to cope with such.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 08, 2015, 01:30:45 pm
I thought being in separate folders would be enough; if you wish I can add the suffixes back.
Do you wish me to to that?
Oh - maybe I misunderstood the folder structure then. If they are in separate folders it would be fine... Maybe I should apply the interim patch and see myself. I just waited because you said there would be an update...

OK, I will remove the 30/64 once more.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 08, 2015, 01:32:02 pm
Also do we need to have such complex file structure in the libs folder?
Why don't you flatten or at least group libs by purpose - sdk and plugins for example.
I can flatten if you want me to; but, it seemed safer to keep them in separate folders.
I don't know if complete flattening is good. Third party libs may be needed in different versions (as the bzip lib, for example). So if the folders are "too flat" you would probably overwrite a library with a wrong version which is bad. Every target (being plugin or SDK) should have an own folder to cope with such.

I will add back the contrib folders; but, NOT the sdk and base folders.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 08, 2015, 02:13:40 pm
Still building several contrib projects; wxContribItem and wxSmith are the main ones to change output below:

Code: [Select]
$ tree src/lib
src/lib
|-- contrib
|   |-- SpellChecker
|   |   |-- libhunspell.a
|   |   `-- libwxSpellChecker.a
|   |-- devpak_plugin
|   |   `-- libbz2.a
|   |-- help_plugin
|   |   |-- libbzip2.a
|   |   `-- libz.a
|   |-- source_exporter
|   |   `-- libwxPdfDocument.a
|   `-- wxSmithPlot
|       `-- libMathPlot.a
|-- libcodeblocks.a
|-- libdepslib.a
|-- libsqplus.a
|-- libsqstdlib.a
|-- libsquirrel.a
|-- libtxml.a
|-- libwxchartctrl.a
|-- libwxflatnotebook.a
|-- libwxpropgrid.a
`-- libwxscintilla_cb.a

6 directories, 17 files

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 08, 2015, 08:25:20 pm
MortenMacFly: Link to updated patches. Tried PM, also.

https://github.com/stahta01/cb_misc/tree/master/Patches/Git-am (https://github.com/stahta01/cb_misc/tree/master/Patches/Git-am)

Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 08, 2015, 11:16:45 pm
I don't know if complete flattening is good. Third party libs may be needed in different versions (as the bzip lib, for example). So if the folders are "too flat" you would probably overwrite a library with a wrong version which is bad. Every target (being plugin or SDK) should have an own folder to cope with such.
Keep in mind that this will lead to a disaster if it happens on linux!
There we are building with every symbol being visible. Which means that the first symbol named X to load wins and will be called, no matter if the code is expecting the other symbol. This is named symbol collision and it is pretty bad.

Why are there two different bzip implementations? As far as I can see they are named differently (bz2 and bzip2). Are they the same thing? Same API?
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 11, 2015, 05:55:19 pm
I don't know if complete flattening is good. Third party libs may be needed in different versions (as the bzip lib, for example). So if the folders are "too flat" you would probably overwrite a library with a wrong version which is bad. Every target (being plugin or SDK) should have an own folder to cope with such.
Keep in mind that this will lead to a disaster if it happens on linux!
There we are building with every symbol being visible. Which means that the first symbol named X to load wins and will be called, no matter if the code is expecting the other symbol. This is named symbol collision and it is pretty bad.

Why are there two different bzip implementations? As far as I can see they are named differently (bz2 and bzip2). Are they the same thing? Same API?

I have no idea why there is  two different bzip implementations; will check in the furture about why.

Here's the layout I am trying to use in Linux; still have a ways to go before the patch is ready.
Any reasons why this layout is bad? Or ways to improve it?
Code: [Select]
$ tree src/lib src/lib28 src/lib30
src/lib
+-- contrib
|   +-- help_plugin
|       +-- libbzip2.a
|       +-- libz.a
+-- libdepslib.a
+-- libsqplus.a
+-- libsqstdlib.a
+-- libsquirrel.a
+-- libtxml.a
src/lib28
+-- contrib
|   +-- source_exporter
|   |   +-- libwxPdfDocument.a
|   +-- SpellChecker
|       +-- libwxSpellChecker.a
+-- libwxscintilla_cb.a
src/lib30
+-- contrib
|   +-- source_exporter
|   |   +-- libwxPdfDocument.a
|   +-- SpellChecker
|       +-- libwxSpellChecker.a
+-- libwxscintilla_cb.a

8 directories, 13 files

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 11, 2015, 08:50:16 pm
One thing for sure - don't build or use libz.a. We should use the system provided version on linux!
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: stahta01 on September 11, 2015, 10:09:42 pm
One thing for sure - don't build or use libz.a. We should use the system provided version on linux!

Thanks, that is the type of feedback I need.
FYI: I do NOT think I added building of libz.a; so, it might be that way in trunk.

Tim S.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: oBFusCATed on September 12, 2015, 01:43:46 am
Yes, it is that way but this should be fixed. The zlib stuff should be removed from unix projects (hopefully osx has libz).
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 25, 2015, 12:07:47 pm
Yes, it is that way but this should be fixed. The zlib stuff should be removed from unix projects (hopefully osx has libz).
I think it is. These libs are only for Windows, where bz2 and zlib are not guaranteed to be shipped with the compiler.

For the record: BZIP and ZLIB are used in the devpacks and help plugin.

I've updated the sources in SVN so that they use the same (up-to-date) versions of the lib.
Title: Re: exchndl related patch because win32/lib folder is empty in SVN
Post by: MortenMacFly on September 25, 2015, 12:14:03 pm
For the record: BZIP and ZLIB are used in the devpacks and help plugin.
Oh well, we have another location: The wxSpellChecker uses bzlib2, too... :-/ Its now the same version, but is looks like this lib should be put into the core...