Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
exchndl related patch because win32/lib folder is empty in SVN
ollydbg:
--- Quote from: MortenMacFly on July 29, 2015, 06:55:14 am ---
--- Quote from: ollydbg on July 29, 2015, 06:02:57 am ---
--- Quote from: stahta01 on July 29, 2015, 05:44:42 am ---
--- Quote from: 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...
--- End quote ---
I use SJLJ; but, maybe ollydbg uses dwarf version.
Tim S.
--- End quote ---
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
--- End quote ---
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...
--- End quote ---
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.
ollydbg:
--- Quote from: stahta01 on July 27, 2015, 08:21:42 am ---
--- Code: ---Linking executable: devel\codeblocks.exe
Warning: resolving _ExcHndlInit@0 by linking to _ExcHndlInit
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
--- End code ---
Tim S.
--- End quote ---
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: ----------------- 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))
--- End code ---
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: ----------------- 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))
--- End code ---
oBFusCATed:
I see that there is this command now in the wx30.cbp file:
--- Code: ---cmd.exe /c if exist devel30\exchndl.dll del devel30\exchndl.dll
--- End code ---
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...
ollydbg:
The command was added in rev 10411.
--- Code: --- 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" />
--- End code ---
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.
MortenMacFly:
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version