Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: scarphin on September 12, 2011, 10:42:46 pm

Title: Huge sized codeblocks.dll
Post by: scarphin on September 12, 2011, 10:42:46 pm
I'm getting a codeblocks.dll of 64.3mbytes when I'm building the 'all' target of v10.05 with mingw (gcc4.5.2) on win7 sp1. I'm loading the 'CodeBlocks.cbp' project file to build. Is that normal or what am I doing wrong?
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 12, 2011, 10:50:50 pm
Which of the two codeblocks.dll are you talking about?
Take a look at the src/update.bat script for details.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 13, 2011, 08:23:48 am
Sry I wasn't aware of the second one. I'm talking about the one resides in the same folder with 'codeblocks.exe'.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 13, 2011, 09:04:15 pm
Is the cb sdk available for download separately somewhere in case I can't build it?
Title: Re: Huge sized codeblocks.dll
Post by: MortenMacFly on September 13, 2011, 09:20:35 pm
Is the cb sdk available for download separately somewhere in case I can't build it?
What should always work:
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 14, 2011, 09:03:41 am
I'm trying to build the AutoVersioning plugin and no matter which file I link against, the 'autoversioning.dll' file has a size of 1.4mb while the original dll is sized only 283kb. Any ideas?
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 14, 2011, 10:37:20 am
You need to strip the dll. This is done in the update.bat script. And the whole project is build with -g.
Title: Re: Huge sized codeblocks.dll
Post by: Jenna on September 15, 2011, 12:47:58 pm
Sry I wasn't aware of the second one. I'm talking about the one resides in the same folder with 'codeblocks.exe'.

After running update.bat (absolutely needed), you have an exe and the dll's in the devel- and the output-subfolder.
the first one has the debugging symbols included, the second one is stripped.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 15, 2011, 03:08:13 pm
Sry I wasn't aware of the second one. I'm talking about the one resides in the same folder with 'codeblocks.exe'.

After running update.bat (absolutely needed), you have an exe and the dll's in the devel- and the output-subfolder.
the first one has the debugging symbols included, the second one is stripped.
Thnx. Sry for my ignorance, I realized that after I read the wiki page describing how to build cb on windows. The files produced after build are slightly less in size than the nightly's though, I believe that's because I'm using mingw to build and the nightlies are built with tdm-gcc.

I have one last problem. I checked out svn to version 7386 which is 15 August debuggers branch nightly revision and made a couple of changes to the autoversioning plugin then built cb and plugins. The resulting cb executable says revision 7386 and the built plugins work as expected but when I try to update the av plugin in the nightly built, it says plugin is compiled for a different version and doesn't start. Then I realized 15 August debuggers branch nightly is rev7387 (that's what it shows when starting up) although rev number is mentioned as 7386 everywhere else. Rev7387 is registered on the svn as a wxsmith update, I also tried to build rev7387 and tried to update the av plugin in the 15 August debuggers branch nightly with no luck. Why are there different revision numbers? Any help with this?
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 15, 2011, 03:43:03 pm
The svn revision is just informative.
You should check the SDK version numbers (look in cbplugin.h), this is what C::B is looking for.

You can try the Morten's advice, but keep in mind that you should use the same compiler used to compile the nightly.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 16, 2011, 03:32:58 pm
I downloaded tdm-gcc (4.5.2). Built wxwidgets 2.8.12, cb7386 and the plugins with it. And I still get the wrong version error when I try to change the av plugin of 15 August nightly with the one I built. How can I make sure of sdk version of 15 August nightly?
Title: Re: Huge sized codeblocks.dll
Post by: ollydbg on September 16, 2011, 03:48:42 pm
I downloaded tdm-gcc (4.5.2). Built wxwidgets 2.8.12, cb7386 and the plugins with it. And I still get the wrong version error when I try to change the av plugin of 15 August nightly with the one I built. How can I make sure of sdk version of 15 August nightly?

Did you build a full cb (both the codeblocks.cbp and ContribPlugins.workspace)?
Title: Re: Huge sized codeblocks.dll
Post by: stahta01 on September 16, 2011, 03:53:10 pm
I downloaded tdm-gcc (4.5.2). Built wxwidgets 2.8.12, cb7386 and the plugins with it. And I still get the wrong version error when I try to change the av plugin of 15 August nightly with the one I built. How can I make sure of sdk version of 15 August nightly?


For 15 August nightly debugger version

http://svn.berlios.de/viewvc/codeblocks/branches/wxpropgrid_debugger/src/include/cbplugin.h?view=log

from http://svn.berlios.de/viewvc/codeblocks/branches/wxpropgrid_debugger/src/include/cbplugin.h?revision=7377&view=markup

Code
// this is the plugins SDK version number
38 // it will change when the SDK interface breaks
39 #define PLUGIN_SDK_VERSION_MAJOR 1
40 #define PLUGIN_SDK_VERSION_MINOR 12
41 #define PLUGIN_SDK_VERSION_RELEASE 6

I suggest checking out the "wxpropgrid_debugger" instead of trunk if you wish to build debugger based plugins.

For 15 August nightly normal trunk version

http://svn.berlios.de/viewvc/codeblocks/trunk/src/include/

from http://svn.berlios.de/viewvc/codeblocks/trunk/src/include/cbplugin.h?revision=7318&view=markup

Code
// this is the plugins SDK version number
36 // it will change when the SDK interface breaks
37 #define PLUGIN_SDK_VERSION_MAJOR 1
38 #define PLUGIN_SDK_VERSION_MINOR 11
39 #define PLUGIN_SDK_VERSION_RELEASE 15

Mixing Nightly Plugins of "Debug  branch" with SDK of Normal "Trunk" Branch are going to fail.

Tim S.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 16, 2011, 05:54:13 pm
I downloaded tdm-gcc (4.5.2). Built wxwidgets 2.8.12, cb7386 and the plugins with it. And I still get the wrong version error when I try to change the av plugin of 15 August nightly with the one I built. How can I make sure of sdk version of 15 August nightly?

Did you build a full cb (both the codeblocks.cbp and ContribPlugins.workspace)?

Definitely.

stahta: I'm already using the debugger branch to build even the same revision.

Is there a procedure to update the plugins? I'm just replacing the files 'AutoVersioning.zip' and 'AutoVersioning.dll' before I launch cb. ;/
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 16, 2011, 05:56:41 pm
Does your full cb version works?
Why don't you use your version?  :lol:

What is the error message?
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 16, 2011, 06:07:50 pm
Yup it works except the qtworkbench plugin but that I know that is compiled before the cb API changed. I want to use the nightlies because I don't want to build the whole cb and plugins for myself every time a new nightly comes out. ;)

Error msg is 'One or more plugins were not loaded. This usually happens when a plugin is built for a different version of the Code::Blocks SDK. Check the application log for more info. List of failed plugins: AutoVersioning.dll'!
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 16, 2011, 06:45:03 pm
And what is written in the log? Its title is Code::Blocks (probably this should be modified)
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 16, 2011, 06:54:30 pm
Sry, where do I find the log?
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 16, 2011, 06:56:00 pm
In the log pane...
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 16, 2011, 07:00:52 pm
Sry again, I misunderstood. It says:
Code
Scanning for lexers in C:\Users\scarphin\AppData\Roaming\CodeBlocks/share/codeblocks/lexers/...
Found 0 lexers
Scanning for lexers in C:\GNU\CodeBlocks/share/codeblocks/lexers/...
Found 43 lexers
Loading lexer_A68k
Loading lexer_ada
Loading lexer_angelscript
Loading lexer_bash
Loading lexer_batch
Loading lexer_bibtex
Loading lexer_caml
Loading lexer_cg
Loading lexer_cpp
Loading lexer_css
Loading lexer_d
Loading lexer_diff
Loading lexer_f77
Loading lexer_fortran
Loading lexer_glsl
Loading lexer_gm
Loading lexer_haskell
Loading lexer_hitasm
Loading lexer_html
Loading lexer_latex
Loading lexer_lisp
Loading lexer_lua
Loading lexer_make
Loading lexer_masm
Loading lexer_matlab
Loading lexer_nsis
Loading lexer_OgreCompositor
Loading lexer_OgreMaterial
Loading lexer_pascal
Loading lexer_perl
Loading lexer_postscript
Loading lexer_prg
Loading lexer_properties
Loading lexer_python
Loading lexer_rc
Loading lexer_ruby
Loading lexer_smalltalk
Loading lexer_sql
Loading lexer_squirrel
Loading lexer_vbscript
Loading lexer_verilog
Loading lexer_vhdl
Loading lexer_xml
Configured 0 tools
Scanning for plugins in C:\Users\scarphin\AppData\Roaming\CodeBlocks/share/codeblocks/plugins
SDK version mismatch for QtWorkbench (1.11.12). Expecting 1.12.6
Loaded 1 plugins
Scanning for plugins in C:\GNU\CodeBlocks/share/codeblocks/plugins
C:\GNU\CodeBlocks/share/codeblocks/plugins/AutoVersioning.dll: not loaded (missing symbols?)
SDK version mismatch for QtWorkbench (1.11.12). Expecting 1.12.6
Tools Plus Plugin: Registering shell type Piped Process Control
Loaded 48 plugins
Loading:
Abbreviations
AStylePlugin
Autosave
BrowseTracker
BYOGames
CB_Koders
Cccc
ClassWizard
CodeCompletion
CodeSnippets
CodeStat
Compiler
copystrings
CppCheck
Cscope
Debugger
FilesExtensionHandler
DevPakUpdater
cbDragScroll
EditorTweaks
EnvVars
Exporter
FileManager
HeaderFixup
HelpPlugin
HexEditor
IncrementalSearch
cbKeyBinder
lib_finder
MouseSap
NassiShneidermanPlugin
OpenFilesList
Profiler
ProjectsImporter
RegExTestbed
ReopenEditor
ScriptedWizard
SymTab
ThreadSearch
ToDoList
ToolsPlus
wxSmithMime
wxSmithAui
wxSmithContribItems
WindowsXPLookNFeel
Running startup script
Script/function 'edit_startup_script.script' registered under menu '&Settings/-Edit startup script'
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 16, 2011, 07:11:16 pm
It looks pretty strange.
What happens if you copy the QtWorkbench plugin in you full cb build and try to start it.?
Do you see the same log/problem?

What happens if you remove the QtWorkbench plugin?

p.s. keep in mind that the api in the debugger's branch is changing with every nightly, so you won't be able to use old plugins. Why don't you try to build the QtWorkbench yourself?
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 16, 2011, 08:08:07 pm
That's the log when I copy the qtworkbench plugin to my custom cb build:
Code
Scanning for lexers in C:\Users\scarphin\AppData\Roaming\CodeBlocks/share/codeblocks/lexers/...
Found 0 lexers
Scanning for lexers in D:\Coding\Projects\codeblocks\branches\wxpropgrid_debugger\src\output/share/codeblocks/lexers/...
Found 43 lexers
Loading lexer_A68k
Loading lexer_ada
Loading lexer_angelscript
Loading lexer_bash
Loading lexer_batch
Loading lexer_bibtex
Loading lexer_caml
Loading lexer_cg
Loading lexer_cpp
Loading lexer_css
Loading lexer_d
Loading lexer_diff
Loading lexer_f77
Loading lexer_fortran
Loading lexer_glsl
Loading lexer_gm
Loading lexer_haskell
Loading lexer_hitasm
Loading lexer_html
Loading lexer_latex
Loading lexer_lisp
Loading lexer_lua
Loading lexer_make
Loading lexer_masm
Loading lexer_matlab
Loading lexer_nsis
Loading lexer_OgreCompositor
Loading lexer_OgreMaterial
Loading lexer_pascal
Loading lexer_perl
Loading lexer_postscript
Loading lexer_prg
Loading lexer_properties
Loading lexer_python
Loading lexer_rc
Loading lexer_ruby
Loading lexer_smalltalk
Loading lexer_sql
Loading lexer_squirrel
Loading lexer_vbscript
Loading lexer_verilog
Loading lexer_vhdl
Loading lexer_xml
Configured 0 tools
Scanning for plugins in C:\Users\scarphin\AppData\Roaming\CodeBlocks/share/codeblocks/plugins
C:\Users\scarphin\AppData\Roaming\CodeBlocks/share/codeblocks/plugins/QtWorkbench.dll: not loaded (missing symbols?)
Loaded 0 plugins
Scanning for plugins in D:\Coding\Projects\codeblocks\branches\wxpropgrid_debugger\src\output/share/codeblocks/plugins
D:\Coding\Projects\codeblocks\branches\wxpropgrid_debugger\src\output/share/codeblocks/plugins/QtWorkbench.dll: not loaded (missing symbols?)
Loaded 14 plugins
Loading:
Abbreviations
AStylePlugin
Autosave
AutoVersioning
ClassWizard
CodeCompletion
Compiler
Debugger
FilesExtensionHandler
OpenFilesList
ProjectsImporter
ScriptedWizard
ToDoList
WindowsXPLookNFeel
Running startup script
Script/function 'edit_startup_script.script' registered under menu '&Settings/-Edit startup script'
It gives the same version error. That's the log on 15 August nightly when I delete the 'qtworkbench.dll':
Code
Scanning for lexers in C:\Users\scarphin\AppData\Roaming\CodeBlocks/share/codeblocks/lexers/...
Found 0 lexers
Scanning for lexers in C:\GNU\CodeBlocks/share/codeblocks/lexers/...
Found 43 lexers
Loading lexer_A68k
Loading lexer_ada
Loading lexer_angelscript
Loading lexer_bash
Loading lexer_batch
Loading lexer_bibtex
Loading lexer_caml
Loading lexer_cg
Loading lexer_cpp
Loading lexer_css
Loading lexer_d
Loading lexer_diff
Loading lexer_f77
Loading lexer_fortran
Loading lexer_glsl
Loading lexer_gm
Loading lexer_haskell
Loading lexer_hitasm
Loading lexer_html
Loading lexer_latex
Loading lexer_lisp
Loading lexer_lua
Loading lexer_make
Loading lexer_masm
Loading lexer_matlab
Loading lexer_nsis
Loading lexer_OgreCompositor
Loading lexer_OgreMaterial
Loading lexer_pascal
Loading lexer_perl
Loading lexer_postscript
Loading lexer_prg
Loading lexer_properties
Loading lexer_python
Loading lexer_rc
Loading lexer_ruby
Loading lexer_smalltalk
Loading lexer_sql
Loading lexer_squirrel
Loading lexer_vbscript
Loading lexer_verilog
Loading lexer_vhdl
Loading lexer_xml
Configured 0 tools
Scanning for plugins in C:\Users\scarphin\AppData\Roaming\CodeBlocks/share/codeblocks/plugins
SDK version mismatch for QtWorkbench (1.11.12). Expecting 1.12.6
Loaded 1 plugins
Scanning for plugins in C:\GNU\CodeBlocks/share/codeblocks/plugins
Tools Plus Plugin: Registering shell type Piped Process Control
Loaded 48 plugins
Loading:
Abbreviations
AStylePlugin
Autosave
AutoVersioning
BrowseTracker
BYOGames
CB_Koders
Cccc
ClassWizard
CodeCompletion
CodeSnippets
CodeStat
Compiler
copystrings
CppCheck
Cscope
Debugger
FilesExtensionHandler
DevPakUpdater
cbDragScroll
EditorTweaks
EnvVars
Exporter
FileManager
HeaderFixup
HelpPlugin
HexEditor
IncrementalSearch
cbKeyBinder
lib_finder
MouseSap
NassiShneidermanPlugin
OpenFilesList
Profiler
ProjectsImporter
RegExTestbed
ReopenEditor
ScriptedWizard
SymTab
ThreadSearch
ToDoList
ToolsPlus
wxSmithMime
wxSmithAui
wxSmithContribItems
WindowsXPLookNFeel
Running startup script
Script/function 'edit_startup_script.script' registered under menu '&Settings/-Edit startup script'

p.s. keep in mind that the api in the debugger's branch is changing with every nightly, so you won't be able to use old plugins. Why don't you try to build the QtWorkbench yourself?
I think there's a misunderstanding here, I don't care if the qtworkbench plugin works or not, what I'm after is the autoversioning plugin which I made a custom build and giving the 'missing symbols' error when I try to use it with the 15 August nightly. What does that 'missing symbols' mean?
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 16, 2011, 08:43:29 pm
It is just a guess, what the reason might be.
Looks like the autoversion plugin is loading when you remove the qtWorkbench, am I right?
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 16, 2011, 08:54:46 pm
It works on my custom build whether I remove qt plugin or not. I tried removing the qt plugin on the 15 August nightly and load my custom autoversioning build without success as always. It says:
Code
C:\GNU\CodeBlocks/share/codeblocks/plugins/AutoVersioning.dll: not loaded (missing symbols?)
I think it's related with the missing symbols message, maybe I'm doing something wrong during compilation.
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 16, 2011, 09:10:19 pm
Add -z defs to the linker options and if the compilation is successful, you can be sure that there are no missing/undefined symbols.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 17, 2011, 12:51:29 am
That didn't work out too, I ran out of ideas. Thnx for the help.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 17, 2011, 11:24:11 am
Some more debugging, I defined the 'cb' variable as '\branches\wxpropgrid_debugger\src\sdk' in the global variables. Is that correct? Also there is a 'codeblocks' entry in the linked libraries under linker settings of the autoversioning plugin. From where can I see where this entry points to and where should it point to?
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 17, 2011, 12:47:37 pm
See the search paths...
The plugin should be setup for using the currently built codeblocks in ($svnroot)/src/devel ...

BTW: Why don't you provide a patch for the autoversion which could be committed in the svn?
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 17, 2011, 03:23:42 pm
See the search paths...
The plugin should be setup for using the currently built codeblocks in ($svnroot)/src/devel ...
So the 'codeblocks' entry in the linker settings of the plugin should point to my local 'branches/wxpropgrid_debugger/src/devel' folder? Where is it defined I can't find it?

BTW: Why don't you provide a patch for the autoversion which could be committed in the svn?
I already provided 2 but autoversioning seems abandoned. ;) It would be great if the first 1 is committed though. And the 2nd patch provides a better output format imo. They are attached to the autoversioning thread.
Title: Re: Huge sized codeblocks.dll
Post by: oBFusCATed on September 17, 2011, 04:46:55 pm
So the 'codeblocks' entry in the linker settings of the plugin should point to my local 'branches/wxpropgrid_debugger/src/devel' folder? Where is it defined I can't find it?
Yes, Have you tried "Project -> Build options -> src target -> Search dirs -> Linker"?

I already provided 2 but autoversioning seems abandoned. ;) It would be great if the first 1 is committed though. And the 2nd patch provides a better output format imo. They are attached to the autoversioning thread.
Post them on the berlios patch tracker. In the forum there is a chance to be forgotten.
Unfortunately, I don't use the autoversion plugin, so I can't review your patches.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 17, 2011, 09:15:58 pm
Tried with the new nightly, got the same error again. Don't know anything else to try. I posted the patches on patch tracker, hope I did everything right. I guess I'm going to build it everytime a new nightly is built. One last detail left, no matter how I build the cb and plugins (with '-z defs' option or not) I'm getting a 'missing symbols' error when cb tries to load the plugin.
Title: Re: Huge sized codeblocks.dll
Post by: stahta01 on September 17, 2011, 10:29:42 pm
Short and Simple Check List for Building an Custom AutoVersion Plugin linked against Nightly debug build

I consider an resent SVN checkout to be one that uses the same minGW DLL and wxWidgets DLL as the current nightly build.

I have not built an Custom Plugin against a Nightly debug build; but, I did against the normal Nightly build.

1. Use the SDK headers from a resent SVN checkout of debug/propgrid branch
2. Link against the codeblocks.dll from the same resent SVN checkout.
3. Link against the wxWidgets dll
4. Use the same Compiler as the current debug/propgrid branch nightly.

Tim S.
Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 18, 2011, 12:00:15 am
How do I link against a dll exactly? Where do I enter dll's name?
Title: Re: Huge sized codeblocks.dll
Post by: stahta01 on September 18, 2011, 12:12:45 am
http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build

Title: Re: Huge sized codeblocks.dll
Post by: scarphin on September 18, 2011, 01:02:41 am
I don't believe this, it was all there and I tried to work it out for days. :shock: Now it works. Thnx, much appreciated.